Translating PHP Script to Coldfusion

Hello,
I need to translate this code (which is in PHP) to coldfusion, is there anyone who can help me please it´s urgent, thanks a lot.
<?
$ref = $_GET['Reference'];
$act = $_GET['Action'];
$par = $_GET['Param'];
switch ($act) {
case "DETAIL":
echo "Reference=".$ref. "&Action=".$act."&Reponse=".$montant;
break;
case "ERREUR":
echo "Reference=".$ref. "Action=".$act. "Reponse=OK";
break;
case "ACCORD":
echo "Reference=".$ref. "Action=".$act. "Reponse=OK";
break;
case "REFUS":
echo "Reference=".$ref. "Action=".$act. "Reponse=OK";
break;
case "ANNULATION":
echo "Reference=".$ref. "Action=".$act. "Reponse=OK";
break;
?>  

When you're approaching the task of "translating PHP to ColdFusion," and when you find yourself with just-a-moment where you are not "up to your earlobes in alligators" (i.e. when you can recall that "your original objective was to drain the moat ..."), then do try to step back and look at the forest not just the trees.  ColdFusion actually has a rather different philosophy toward designing applications, which can be summed up (I think) like this:
Most web-tools (PHP, dot-Net, even Ruby and Perl) give you the ability to "write a program" that just happens to produce an HTML output.
Content-management (CMS) systems are "really-nifty programs that have already been written for you."
ColdFusion is an application-server system that uses an XML-based declarative syntax.  It is implemented on the back-end using a "just in time" compiler that cranks out the (Java and JavaScript) code for you.  Although many of the "tags" implement conventional procedural-programming constructs such as "switch" and "if" and "loop" and "call," you'll notice that many more do not.
A good example of the difference between them, for me, is the <cftransaction> tag.  This tag declares to ColdFusion that the enclosed block is supposed to "be a database transaction."  This means, without you having to say anything further, that:
A database transaction should be started.
If all of the code within this block completes successfully, the database transaction should be committed.
If an exception occurs within this block, the database transaction should be rolled-back (in addition to anything else that should happen as a consequence of an exception having occurred).
The ColdFusion Engine parses that declarative tag and automagically generates the necessary Java code to implement it correctly, on-the-fly, then executes that code immediately.  You don't have to be consciously aware that this is happening, even though as an application designer you can.
This strategy is especially useful when an application needs to be "scaled up" to run on multiple servers.  When ColdFusion is configured for that environment, the code that it on-the-fly generates is a little bit different.  But the page that you wrote, isn't.

Similar Messages

  • Help with PHP script to Coldfusion

    I have a PHP script that I need to create in coldfusion. I'm
    fairly new to coldfusion and would appreciate any help. Here is the
    PHP script... The code is suppose to retrieve the HTTP POST data
    from the url. I would be open to doing this in Javascript as well.
    Thanks again...
    /* Script Start */
    //Get the file POST data
    $filePost = $_POST[$filePostVariable];
    //Break the file list into an array
    $filePost = explode($fileDelimiter, $filePost);

    <cfset arrayList = ListToArray(url.urlVar)>
    I accessed the URL vars directly via url scope, and the
    default delimiter is comma otherwise add a delimiter to the
    listToArray function. In the PHP example it looks like you had a
    var that held the url var name. I hope this helps.
    Trevor
    Visit Me

  • Running PHP script via ColdFusion

    I'm running CFMX 7 on a Solaris platform with PHP 5.0.5.
    I need to determine the width and height of an uploaded image
    to ensure that the file can be reasonably used on a web page. I
    have scoured the Internet and found a numer of solutions to this.
    Most need the installation of additional software on our server and
    the creation of a custom tag. These are doable, but would require
    additional effort I don't have time for at the moment. Also, the
    software to install is a full image manipulation package that is
    definitely overkill for my needs. Kind of like threading a needle
    with a hammer.
    On the other hand I know that PHP has a command called
    "getimagesize" that would be perfect for my use. This would be much
    more simple and elegant. And I have created a small program (see
    below) that can accept a location of an image file and display the
    width and height of the image as a result. The code is:
    <?php
    list($width, $height) = getimagesize($argv[1]);
    echo "$width, $height";
    ?>
    I've tested it via the command line and it works fine.
    However, I'm having difficulty in running it via the ColdFusion
    cfexecute tag. Here is that code:
    <cfsavecontent variable="imgsize">
    <cfexecute name="#phpfilelocation#"
    arguments="#imagelocation#"></cfexecute>
    </cfsavecontent>
    I get nothing back from this. I've also tried the cfhttp tag
    with similar results. It seems to me that the argument (the
    location of the image) is not being accepted by the PHP code for
    some reason.
    I've looked for a solution to this within this forum and via
    Google, etc. to no avail. There is apparently something about PHP
    or ColdFusion that is escaping me. Any help clarifying why this is
    not working and (hopefully) a workaround would be very much
    appreciated. Thank you.

    Maybe this will help:
    http://groups.google.com/group/alt.comp.lang.coldfusion/msg/af84ac7dfec0d09e?dq=&hl=en&lr= &ie=UTF-8&oe=UTF-8&rnum=8

  • Help with file uploader, php script, Windows Authentication

    I am trying to setup a really basic web-based file uploader that I will expand upon later. I have the flex application working well enough (very basic). However, I have a php script in a secure folder using windows authentication. When I try to send the file to the script, it doesn't seem to like my credentials, and refuses to do anything. I do not get an error message; just nothing happens.
    My questions are:
    Does anybody know where I should've looked before posting this thread?
    Do I even have PHP set up correctly? (At first I just made a txt file and put a .php extension on it, then I tried to setup PHP on the server, but it was a little confusing for me)
    Is Windows Authentication the problem?
    I do plan on implementing SQL Server in the future (to keep track of Files and user-defined attributes for files), but I do not want to store the files in SQLserver, just their pathnames.
    Is there a simple way to use ColdFusion (for free) to acheive this end?
    I am somewhat experienced at coding applications, but am totally new to server-side scripts.
    This is my php script:
    <?php
    $tempFile = $_FILES['Filedata']['tmp_name'];
    $fileName = $_FILES['Filedata']['name'];
    $fileSize = $_FILES['Filedata']['size'];
    move_uploaded_file($tempFile, "./" . $fileName);
    ?>
    This is my flex application:
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                      xmlns:s="library://ns.adobe.com/flex/spark"
                      xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600">
    <fx:Script>
         <![CDATA[
         private var fileRef:FileReference
         private var uploadFilePath:String
         private function selectFile():void
              fileRef = new FileReference();
              fileRef.addEventListener(Event.SELECT, fileRef_select);
              fileRef.browse();
         private function fileRef_select(evt:Event):void
              fileRef.upload(new URLRequest("http://SERVERLOCATION/PDFUploader.php"));
         ]]>
    </fx:Script>
         <s:Button top="30" left="5" label="Browse" click="selectFile()"/>
    </s:Application>
    Thanks to any who take the time to respond.

    Hey, so far all I have found is this tutorial.. I'm about to try it out
    http://www.smartwebby.com/Flash/external_data.asp

  • Help downgrade a php script generated by FB back to the old Mysql way

    hey all
    i am a Flex developer who has written server side stuff with php scripts that were auto-generated by Flash Builder. These scripts use the Mysqli extention, which is not avilable on my shared hosting server. These scripts implement simple CRUD functions to a MySql database. Anyone who has used the data wizard will recognize these scripts.
    Just before i pay more bucks and move to a VPS server in order to enable Mysqli, is there anyone out there who can help me translate this script BACK to the old mysql way?
    much appriciated, Saar
    <?php
    class ClientService {
        var $username = "******";
        var $password = "******";
        var $server = "localhost";
        var $port = "3306";
        var $databasename = "rtdbcbx_saar";
        var $tablename = "clients";
        var $connection;
         * The constructor initializes the connection to database. Everytime a request is
         * received by Zend AMF, an instance of the service class is created and then the
         * requested method is invoked.
        public function __construct() {
            $this->connection = mysqli_connect(
                                    $this->server, 
                                    $this->username, 
                                    $this->password,
                                    $this->databasename,
                                    $this->port
            $this->throwExceptionOnError($this->connection);
         * Returns all the rows from the table.
         * Add authroization or any logical checks for secure access to your data
         * @return array
        public function getAllClient() {
            $stmt = mysqli_prepare($this->connection, "SELECT * FROM $this->tablename");       
            $this->throwExceptionOnError();
            mysqli_stmt_execute($stmt);
            $this->throwExceptionOnError();
            $rows = array();
            mysqli_stmt_bind_result($stmt, $row->ClientID, $row->First, $row->Last, $row->Phone, $row->Email, $row->Chain, $row->Branch, $row->Kiosk, $row->SubmitDate);
            while (mysqli_stmt_fetch($stmt)) {
              $row->SubmitDate = new DateTime($row->SubmitDate);
              $rows[] = $row;
              $row = new stdClass();
              mysqli_stmt_bind_result($stmt, $row->ClientID, $row->First, $row->Last, $row->Phone, $row->Email, $row->Chain, $row->Branch, $row->Kiosk, $row->SubmitDate);
            mysqli_stmt_free_result($stmt);
            mysqli_close($this->connection);
            return $rows;
         * Returns the item corresponding to the value specified for the primary key.
         * Add authorization or any logical checks for secure access to your data
         * @return stdClass
        public function getClientByID($itemID) {
            $stmt = mysqli_prepare($this->connection, "SELECT * FROM $this->tablename where ClientID=?");
            $this->throwExceptionOnError();
            mysqli_stmt_bind_param($stmt, 'i', $itemID);       
            $this->throwExceptionOnError();
            mysqli_stmt_execute($stmt);
            $this->throwExceptionOnError();
            mysqli_stmt_bind_result($stmt, $row->ClientID, $row->First, $row->Last, $row->Phone, $row->Email, $row->Chain, $row->Branch, $row->Kiosk, $row->SubmitDate);
            if(mysqli_stmt_fetch($stmt)) {
              $row->SubmitDate = new DateTime($row->SubmitDate);
              return $row;
            } else {
              return null;
         * Returns the item corresponding to the value specified for the primary key.
         * Add authorization or any logical checks for secure access to your data
         * @return stdClass
        public function createClient($item) {
            $stmt = mysqli_prepare($this->connection, "INSERT INTO $this->tablename (First, Last, Phone, Email, Chain, Branch, Kiosk, SubmitDate) VALUES (?, ?, ?, ?, ?, ?, ?, ?)");
            $this->throwExceptionOnError();
            mysqli_stmt_bind_param($stmt, 'ssssssss', $item->First, $item->Last, $item->Phone, $item->Email, $item->Chain, $item->Branch, $item->Kiosk, $item->SubmitDate->toString('YYYY-MM-dd HH:mm:ss'));
            $this->throwExceptionOnError();
            mysqli_stmt_execute($stmt);    
            $this->throwExceptionOnError();
            $autoid = mysqli_stmt_insert_id($stmt);
            mysqli_stmt_free_result($stmt);    
            mysqli_close($this->connection);
            return $autoid;
         * Updates the passed item in the table.
         * Add authorization or any logical checks for secure access to your data
         * @param stdClass $item
         * @return void
        public function updateClient($item) {
            $stmt = mysqli_prepare($this->connection, "UPDATE $this->tablename SET First=?, Last=?, Phone=?, Email=?, Chain=?, Branch=?, Kiosk=?, SubmitDate=? WHERE ClientID=?");     
            $this->throwExceptionOnError();
            mysqli_stmt_bind_param($stmt, 'ssssssssi', $item->First, $item->Last, $item->Phone, $item->Email, $item->Chain, $item->Branch, $item->Kiosk, $item->SubmitDate->toString('YYYY-MM-dd HH:mm:ss'), $item->ClientID);     
            $this->throwExceptionOnError();
            mysqli_stmt_execute($stmt);    
            $this->throwExceptionOnError();
            mysqli_stmt_free_result($stmt);    
            mysqli_close($this->connection);
         * Deletes the item corresponding to the passed primary key value from
         * the table.
         * Add authorization or any logical checks for secure access to your data
         * @return void
        public function deleteClient($itemID) {
            $stmt = mysqli_prepare($this->connection, "DELETE FROM $this->tablename WHERE ClientID = ?");
            $this->throwExceptionOnError();
            mysqli_stmt_bind_param($stmt, 'i', $itemID);
            mysqli_stmt_execute($stmt);
            $this->throwExceptionOnError();
            mysqli_stmt_free_result($stmt);    
            mysqli_close($this->connection);
         * Returns the number of rows in the table.
         * Add authorization or any logical checks for secure access to your data
        public function count() {
            $stmt = mysqli_prepare($this->connection, "SELECT COUNT(*) AS COUNT FROM $this->tablename");
            $this->throwExceptionOnError();
            mysqli_stmt_execute($stmt);
            $this->throwExceptionOnError();
            mysqli_stmt_bind_result($stmt, $rec_count);
            $this->throwExceptionOnError();
            mysqli_stmt_fetch($stmt);
            $this->throwExceptionOnError();
            mysqli_stmt_free_result($stmt);
            mysqli_close($this->connection);
            return $rec_count;
         * Returns $numItems rows starting from the $startIndex row from the
         * table.
         * Add authorization or any logical checks for secure access to your data
         * @return array
        public function getClient_paged($startIndex, $numItems) {
            $stmt = mysqli_prepare($this->connection, "SELECT * FROM $this->tablename LIMIT ?, ?");
            $this->throwExceptionOnError();
            mysqli_stmt_bind_param($stmt, 'ii', $startIndex, $numItems);
            mysqli_stmt_execute($stmt);
            $this->throwExceptionOnError();
            $rows = array();
            mysqli_stmt_bind_result($stmt, $row->ClientID, $row->First, $row->Last, $row->Phone, $row->Email, $row->Chain, $row->Branch, $row->Kiosk, $row->SubmitDate);
            while (mysqli_stmt_fetch($stmt)) {
              $row->SubmitDate = new DateTime($row->SubmitDate);
              $rows[] = $row;
              $row = new stdClass();
              mysqli_stmt_bind_result($stmt, $row->ClientID, $row->First, $row->Last, $row->Phone, $row->Email, $row->Chain, $row->Branch, $row->Kiosk, $row->SubmitDate);
            mysqli_stmt_free_result($stmt);    
            mysqli_close($this->connection);
            return $rows;
         * Utility function to throw an exception if an error occurs
         * while running a mysql command.
        private function throwExceptionOnError($link = null) {
            if($link == null) {
                $link = $this->connection;
            if(mysqli_error($link)) {
                $msg = mysqli_errno($link) . ": " . mysqli_error($link);
                throw new Exception('MySQL Error - '. $msg);
    ?>

    hello derekmosdell, in case this question isn't related to volume of media content in firefox in particular, we probably won't be able to answer that. please refer to apple's support resources or discussion fora instead.
    thank you for your understanding!

  • Accessing passed arguments from php script?

    I have a php script which will pass an argument which I need
    to turn in to a coldfusion variable, how should I go about doing
    this?

    I am developing a cf application to interface with the PLESK
    control panel's Event manager to dynamically setup cf security
    sandboxes when a new domain is added to PLESK. Plesk uses encrypted
    php3 files and with the use of the event manager API I can pass the
    new domain name to any script. However, I cannot alter the way
    PLESK sends the param <new domain> therefore a cfhttp post is
    impossible. All I can do is path the new domain as an argument to
    the file IE: myscript.cfm.
    I have tested passing the new domain to a bash shell script
    and then using bash to drop the new domain name into a database
    then using CURL to execute the .cfm file which sets up the new
    sandbox. This is tested and working on Linux servers but now my
    task is to do the same for Windows servers, hence I would prefer to
    keep all the coding under cf

  • Webserver on DMZ cannot send email via php script using SMTP (cisco firewall pix 515e)

    Hello,
    I have two web servers that are sitting in a DMZ behind a Cisco Firewall PIX 515e. The webservers appear to be configured correctly as our website and FTP website are up. On two of our main website, we have two contact forms that use a simple html for to call a php script that uses smtp as its mailing protocol. Since, I am not the network administrator, I don't quite understand how to  read the current configurations on the firewall, but I suspect that port 25 is blocked, which prevents the script from actually working or sending out emails.  What I've done to narrow the problem done is the following: I used a wamp server to test our scripts with our smtp servers settings, was able to successfully send an email out to both my gmail and work place accounts. Currently, we have backupexec loaded on both of these servers, and when I try to send out an alert I never receive it. I think because port 25 is closed on both of those servers.  I will be posting our configuration. if anyone can take a look and perhaps explain to me how I can change our webservers to communicate and successfully deliver mail via that script, I would gladly appreciate it. our IP range is 172.x.x.x, but it looks like our webservers are using 192.x.x.x with NAT in place. Please someone help.
    Thanks,
    Jeff Mateo
    PIX Version 6.3(4)
    interface ethernet0 100full
    interface ethernet1 100full
    interface ethernet2 100full
    nameif ethernet0 outside security0
    nameif ethernet1 inside security100
    nameif ethernet2 DMZ security50
    enable password GFO9OSBnaXE.n8af encrypted
    passwd GFO9OSBnaXE.n8af encrypted
    hostname morrow-pix-ct
    domain-name morrowco.com
    clock timezone EST -5
    clock summer-time EDT recurring
    fixup protocol dns maximum-length 512
    fixup protocol ftp 21
    fixup protocol h323 h225 1720
    fixup protocol h323 ras 1718-1719
    fixup protocol http 80
    fixup protocol rsh 514
    fixup protocol rtsp 554
    fixup protocol sip 5060
    fixup protocol sip udp 5060
    fixup protocol skinny 2000
    no fixup protocol smtp 25
    fixup protocol sqlnet 1521
    fixup protocol tftp 69
    names
    name 12.42.47.27 LI-PIX
    name 172.20.0.0 CT-NET
    name 172.23.0.0 LI-NET
    name 172.22.0.0 TX-NET
    name 172.25.0.0 NY-NET
    name 192.168.10.0 CT-DMZ-NET
    name 1.1.1.1 DHEC_339849.ATI__LEC_HCS722567SN
    name 1.1.1.2 DHEC_339946.ATI__LEC_HCS722632SN
    name 199.191.128.105 web-dns-1
    name 12.127.16.69 web-dns-2
    name 12.3.125.178 NY-PIX
    name 64.208.123.130 TX-PIX
    name 24.38.31.80 CT-PIX
    object-group network morrow-net
    network-object 12.42.47.24 255.255.255.248
    network-object NY-PIX 255.255.255.255
    network-object 64.208.123.128 255.255.255.224
    network-object 24.38.31.64 255.255.255.224
    network-object 24.38.35.192 255.255.255.248
    object-group service morrow-mgmt tcp
    port-object eq 3389
    port-object eq telnet
    port-object eq ssh
    object-group network web-dns
    network-object web-dns-1 255.255.255.255
    network-object web-dns-2 255.255.255.255
    access-list out1 permit icmp any any echo-reply
    access-list out1 permit icmp object-group morrow-net any
    access-list out1 permit tcp any host 12.193.192.132 eq ssh
    access-list out1 permit tcp any host CT-PIX eq ssh
    access-list out1 permit tcp any host 24.38.31.72 eq smtp
    access-list out1 permit tcp any host 24.38.31.72 eq https
    access-list out1 permit tcp any host 24.38.31.72 eq www
    access-list out1 permit tcp any host 24.38.31.70 eq www
    access-list out1 permit tcp any host 24.38.31.93 eq www
    access-list out1 permit tcp any host 24.38.31.93 eq https
    access-list out1 permit tcp any host 24.38.31.93 eq smtp
    access-list out1 permit tcp any host 24.38.31.93 eq ftp
    access-list out1 permit tcp any host 24.38.31.93 eq domain
    access-list out1 permit tcp any host 24.38.31.94 eq www
    access-list out1 permit tcp any host 24.38.31.94 eq https
    access-list out1 permit tcp any host 24.38.31.71 eq www
    access-list out1 permit tcp any host 24.38.31.71 eq 8080
    access-list out1 permit tcp any host 24.38.31.71 eq 8081
    access-list out1 permit tcp any host 24.38.31.71 eq 8090
    access-list out1 permit tcp any host 24.38.31.69 eq ssh
    access-list out1 permit tcp any host 24.38.31.94 eq ftp
    access-list out1 permit tcp any host 24.38.31.92 eq 8080
    access-list out1 permit tcp any host 24.38.31.92 eq www
    access-list out1 permit tcp any host 24.38.31.92 eq 8081
    access-list out1 permit tcp any host 24.38.31.92 eq 8090
    access-list out1 permit tcp any host 24.38.31.93 eq 3389
    access-list out1 permit tcp any host 24.38.31.92 eq https
    access-list out1 permit tcp any host 24.38.31.70 eq https
    access-list out1 permit tcp any host 24.38.31.74 eq www
    access-list out1 permit tcp any host 24.38.31.74 eq https
    access-list out1 permit tcp any host 24.38.31.74 eq smtp
    access-list out1 permit tcp any host 24.38.31.75 eq https
    access-list out1 permit tcp any host 24.38.31.75 eq www
    access-list out1 permit tcp any host 24.38.31.75 eq smtp
    access-list out1 permit tcp any host 24.38.31.70 eq smtp
    access-list out1 permit tcp any host 24.38.31.94 eq smtp
    access-list dmz1 permit icmp any any echo-reply
    access-list dmz1 deny ip any 10.0.0.0 255.0.0.0
    access-list dmz1 deny ip any 172.16.0.0 255.240.0.0
    access-list dmz1 deny ip any 192.168.0.0 255.255.0.0
    access-list dmz1 permit ip any any
    access-list dmz1 deny ip any any
    access-list nat0 permit ip CT-NET 255.255.0.0 192.168.220.0 255.255.255.0
    access-list nat0 permit ip host 172.20.8.2 host 172.23.0.2
    access-list nat0 permit ip CT-NET 255.255.0.0 LI-NET 255.255.0.0
    access-list nat0 permit ip CT-NET 255.255.0.0 NY-NET 255.255.0.0
    access-list nat0 permit ip CT-NET 255.255.0.0 TX-NET 255.255.0.0
    access-list vpn-split-tun permit ip CT-NET 255.255.0.0 192.168.220.0 255.255.255
    .0
    access-list vpn-split-tun permit ip CT-DMZ-NET 255.255.255.0 192.168.220.0 255.2
    55.255.0
    access-list vpn-dyn-match permit ip any 192.168.220.0 255.255.255.0
    access-list vpn-ct-li-gre permit gre host 172.20.8.2 host 172.23.0.2
    access-list vpn-ct-ny permit ip CT-NET 255.255.0.0 NY-NET 255.255.0.0
    access-list vpn-ct-ny permit ip CT-DMZ-NET 255.255.255.0 NY-NET 255.255.0.0
    access-list vpn-ct-tx permit ip CT-NET 255.255.0.0 TX-NET 255.255.0.0
    access-list vpn-ct-tx permit ip CT-DMZ-NET 255.255.255.0 TX-NET 255.255.0.0
    access-list static-dmz-to-ct-2 permit ip host 192.168.10.141 CT-NET 255.255.248.
    0
    access-list nat0-dmz permit ip CT-DMZ-NET 255.255.255.0 192.168.220.0 255.255.25
    5.0
    access-list nat0-dmz permit ip CT-DMZ-NET 255.255.255.0 LI-NET 255.255.0.0
    access-list nat0-dmz permit ip CT-DMZ-NET 255.255.255.0 NY-NET 255.255.0.0
    access-list nat0-dmz permit ip CT-DMZ-NET 255.255.255.0 TX-NET 255.255.0.0
    access-list static-dmz-to-ct-1 permit ip host 192.168.10.140 CT-NET 255.255.248.
    0
    access-list static-dmz-to-li-1 permit ip CT-DMZ-NET 255.255.255.0 CT-NET 255.255
    .248.0
    access-list vpn-ct-li permit ip CT-NET 255.255.0.0 LI-NET 255.255.0.0
    access-list vpn-ct-li permit ip CT-DMZ-NET 255.255.255.0 LI-NET 255.255.0.0
    access-list vpn-ct-li permit ip host 10.10.2.2 host 10.10.1.1
    access-list in1 permit tcp host 172.20.1.21 any eq smtp
    access-list in1 permit tcp host 172.20.1.20 any eq smtp
    access-list in1 deny tcp any any eq smtp
    access-list in1 permit ip any any
    access-list in1 permit tcp any any eq smtp
    access-list cap4 permit ip host 172.20.1.82 host 192.168.220.201
    access-list cap2 permit ip host 172.20.1.82 192.168.220.0 255.255.255.0
    access-list in2 deny ip host 172.20.1.82 any
    access-list in2 deny ip host 172.20.1.83 any
    access-list in2 permit ip any any
    pager lines 43
    logging on
    logging timestamp
    logging buffered notifications
    logging trap notifications
    logging device-id hostname
    logging host inside 172.20.1.22
    mtu outside 1500
    mtu inside 1500
    mtu DMZ 1500
    ip address outside CT-PIX 255.255.255.224
    ip address inside 172.20.8.1 255.255.255.0
    ip address DMZ 192.168.10.1 255.255.255.0
    ip audit info action alarm
    ip audit attack action alarm
    ip local pool ctpool 192.168.220.100-192.168.220.200
    ip local pool ct-thomson-pool-201 192.168.220.201 mask 255.255.255.255
    pdm history enable
    arp timeout 14400
    global (outside) 1 24.38.31.81
    nat (inside) 0 access-list nat0
    nat (inside) 1 CT-NET 255.255.0.0 2000 10
    nat (DMZ) 0 access-list nat0-dmz
    static (inside,DMZ) CT-NET CT-NET netmask 255.255.0.0 0 0
    static (inside,outside) 24.38.31.69 172.20.8.2 netmask 255.255.255.255 0 0
    static (DMZ,outside) 24.38.31.94 192.168.10.141 netmask 255.255.255.255 0 0
    static (inside,outside) 24.38.31.71 172.20.1.11 dns netmask 255.255.255.255 0 0
    static (DMZ,outside) 24.38.31.93 192.168.10.140 netmask 255.255.255.255 0 0
    static (DMZ,inside) 24.38.31.93 access-list static-dmz-to-ct-1 0 0
    static (DMZ,inside) 24.38.31.94 access-list static-dmz-to-ct-2 0 0
    static (inside,outside) 24.38.31.92 172.20.1.56 netmask 255.255.255.255 0 0
    static (DMZ,outside) 24.38.31.91 192.168.10.138 netmask 255.255.255.255 0 0
    static (DMZ,outside) 24.38.31.90 192.168.10.139 netmask 255.255.255.255 0 0
    static (inside,outside) 24.38.31.72 172.20.1.20 netmask 255.255.255.255 0 0
    static (inside,outside) 24.38.31.73 172.20.1.21 netmask 255.255.255.255 0 0
    static (inside,outside) 24.38.31.70 172.20.1.91 netmask 255.255.255.255 0 0
    static (DMZ,outside) 24.38.31.88 192.168.10.136 netmask 255.255.255.255 0 0
    static (DMZ,outside) 24.38.31.89 192.168.10.137 netmask 255.255.255.255 0 0
    static (inside,outside) 24.38.31.74 172.20.1.18 netmask 255.255.255.255 0 0
    static (inside,outside) 24.38.31.75 172.20.1.92 netmask 255.255.255.255 0 0
    access-group out1 in interface outside
    access-group dmz1 in interface DMZ
    route outside 0.0.0.0 0.0.0.0 24.38.31.65 1
    route inside 10.10.2.2 255.255.255.255 172.20.8.2 1
    route inside CT-NET 255.255.248.0 172.20.8.2 1
    timeout xlate 3:00:00
    timeout conn 1:00:00 half-closed 0:10:00 udp 0:02:00 rpc 0:10:00 h225 1:00:00
    timeout h323 0:05:00 mgcp 0:05:00 sip 0:30:00 sip_media 0:02:00
    timeout uauth 0:05:00 absolute
    aaa-server TACACS+ protocol tacacs+
    aaa-server TACACS+ max-failed-attempts 3
    aaa-server TACACS+ deadtime 10
    aaa-server RADIUS protocol radius
    aaa-server RADIUS max-failed-attempts 3
    aaa-server RADIUS deadtime 10
    aaa-server LOCAL protocol local
    aaa-server ct-rad protocol radius
    aaa-server ct-rad max-failed-attempts 2
    aaa-server ct-rad deadtime 10
    aaa-server ct-rad (inside) host 172.20.1.22 morrow123 timeout 7
    aaa authentication ssh console LOCAL
    aaa authentication http console LOCAL
    aaa authentication serial console LOCAL
    aaa authentication telnet console LOCAL
    http server enable
    http 173.220.252.56 255.255.255.248 outside
    http 65.51.181.80 255.255.255.248 outside
    http 208.65.108.176 255.255.255.240 outside
    http CT-NET 255.255.0.0 inside
    no snmp-server location
    no snmp-server contact
    snmp-server community m0rroW(0
    no snmp-server enable traps
    floodguard enable
    sysopt connection permit-ipsec
    sysopt connection permit-pptp
    crypto ipsec transform-set 3des-sha esp-3des esp-sha-hmac
    crypto ipsec transform-set 3des-md5 esp-3des esp-md5-hmac
    crypto dynamic-map dyn_map 20 match address vpn-dyn-match
    crypto dynamic-map dyn_map 20 set transform-set 3des-sha
    crypto map ct-crypto 10 ipsec-isakmp
    crypto map ct-crypto 10 match address vpn-ct-li-gre
    crypto map ct-crypto 10 set peer LI-PIX
    crypto map ct-crypto 10 set transform-set 3des-sha
    crypto map ct-crypto 15 ipsec-isakmp
    crypto map ct-crypto 15 match address vpn-ct-li
    crypto map ct-crypto 15 set peer LI-PIX
    crypto map ct-crypto 15 set transform-set 3des-sha
    crypto map ct-crypto 20 ipsec-isakmp
    crypto map ct-crypto 20 match address vpn-ct-ny
    crypto map ct-crypto 20 set peer NY-PIX
    crypto map ct-crypto 20 set transform-set 3des-sha
    crypto map ct-crypto 30 ipsec-isakmp
    crypto map ct-crypto 30 match address vpn-ct-tx
    crypto map ct-crypto 30 set peer TX-PIX
    crypto map ct-crypto 30 set transform-set 3des-sha
    crypto map ct-crypto 65535 ipsec-isakmp dynamic dyn_map
    crypto map ct-crypto client authentication ct-rad
    crypto map ct-crypto interface outside
    isakmp enable outside
    isakmp key ******** address LI-PIX netmask 255.255.255.255 no-xauth no-config-mo
    de
    isakmp key ******** address 216.138.83.138 netmask 255.255.255.255 no-xauth no-c
    onfig-mode
    isakmp key ******** address NY-PIX netmask 255.255.255.255 no-xauth no-config-mo
    de
    isakmp key ******** address TX-PIX netmask 255.255.255.255 no-xauth no-config-mo
    de
    isakmp identity address
    isakmp nat-traversal 20
    isakmp policy 10 authentication pre-share
    isakmp policy 10 encryption 3des
    isakmp policy 10 hash sha
    isakmp policy 10 group 2
    isakmp policy 10 lifetime 86400
    isakmp policy 20 authentication pre-share
    isakmp policy 20 encryption 3des
    isakmp policy 20 hash md5
    isakmp policy 20 group 2
    isakmp policy 20 lifetime 86400
    isakmp policy 30 authentication pre-share
    isakmp policy 30 encryption 3des
    isakmp policy 30 hash md5
    isakmp policy 30 group 1
    isakmp policy 30 lifetime 86400
    vpngroup remotectusers address-pool ctpool
    vpngroup remotectusers dns-server 172.20.1.5
    vpngroup remotectusers wins-server 172.20.1.5
    vpngroup remotectusers default-domain morrowny.com

    Amit,
    I applaud your creativity in seeking to solve your problem, however, this sounds like a real mess in the making. There are two things I don't like about your approach. One, cron -> calling Java -> calling PHP -> accessing database, it's just too many layers, in my opinion, where things can go wrong. Two it seems to me that you are exposing data one your website (with the PHP) that you may not want expose and this is an important consideration when you are dealing with emails and privacy and so on.
    I think the path of least resistance would be to get a new user account added to the MySQL database that you can access remotely with your Java program. This account can be locked down for read only access and be locked down to the specific IP or IP range that your Java program will be connecting from.
    Again I applaud your creativity but truly this seems like a hack because of the complexity and security concerns you are introducing and I think is a path to the land of trouble. Hopefully you will be able to get a remote account set up.

  • Send PDF form to e-mail as attachment with a PHP script on the server

    Hi,
    For several days I've been searching though the internet looking for a solution, a quite simple one in my opinion, but I got a little desperate not getting any result I want.
    Okay. The Situation.
    I have a PDF form to order sandwiches and drinks.
    The PDF has serveral area's and columns where customers fill in the amount of the products they would like to order.
    At a position of a field, the kitchen can almost blindly see what products a customer ordered.
    Therefore, when someone fills in the form, I want to send the filled PDF by e-mail to the kitchen's e-mail adress. And important: the PDF in the kitchen's mailbox should be completely identical to the form the customer filled in.
    So, I have an Order button in my form. I set the action as 'Submit a form'.
    In the settings under 'Enter a URL for this link' I used just some PHP mailer script I also use on my website contact form.
    IF I check 'HTML' under 'Export Format' the PHP mailer works fine. I receive an HTML e-mail listed the ordered products.
    BUT
    I do want the original filled PDF in my mailbox instead of an HTML e-mail.
    So, for 'Export Format' I checked 'PDF The Complete Document'.
    But then my PHP mailer script doesn't work anymore.
    It gives errors like 'no valid e-mail adres' , etcetera etcetera.
    Who has a solution?
    Who has a working standard PHP script for me what just sends the kitchen an empty mail with the original PDF as attachment?!
    There is no need to use any database or other more complex functionality. Just mail the filled PDF.

    You can submit whole PDF format as long as you enable usage rights on the PDF.
    Normally Adobe Reader users can only submit the data, XFDF, FDF, XDP, XML.
    To enable usage rights on the PDF you will need to use Adobe Acrobat Std/Pro.
    As for the PHP Script; it depends on your PHP web server capabilities.
    The script will be slightly different, if the server uses PHP Mail or PHP PEAR.
    Just attach the submission to an email and send.
    If the client is submitting the form from a standalone pdf reader app, you can also respond with a success or failure FDF \status message; otherwise, you can redirect to a success / failure URL.
    For more information and online examples:
    http://www.pdfemail.net/examples/

  • Convert php script to oracle procedure

    To all please help me... I wanna convert php script to oracle procedure..and the script is (exp)..
    <?php
    include("../config/koneksi.php");
    $customer=$_POST['customer'];
    $tanggal1=$_POST['theDate1'];
    $tanggal2=$_POST['theDate2'];
    $no_bulan=substr($tanggal1,0,2);
    $bulan_sajah= (substr($no_bulan,0,1)=='0')? substr($no_bulan,1,1) : $no_bulan;          
    $tahun_sajah=substr($tanggal1,3,4);
    $blnkmrn=(int)$bulan_sajah;
    $thnkmrn=(int)$tahun_sajah;
    if ($blnkmrn==1) {
         $bulan_lalu=12;
         $tahun_lalu=$thnkmrn-1;}
    else {
         $bulan_lalu=$blnkmrn-1;
         $tahun_lalu=$thnkmrn;
    $bulanlalu=strval($bulan_lalu);
    $tahunlalu=strval($tahun_lalu);
    $sql = "select nip_nas from edo_customer_master_dives where standard_name='$customer'";
         $stm = ociparse($conn,$sql);
         ociexecute($stm);
         ocifetch($stm);
         $data=ociresult($stm,1);
         $sql12 = "select PRODUCT_LINE_ID,sum(REVENUE)
    from PA_FACT_REV_BILLED_CC
    where nip_nas='$data' and year_id='$tahun_sajah' and month_id='$bulan_sajah' group by PRODUCT_LINE_ID";
         $stm12 = ociparse($conn,$sql12);
         ociexecute($stm12);
         $total_revenue=0;
         $i="0";
    while (ocifetch($stm12)){
         $rev_items=ociresult($stm12,1);
         $revenue=ociresult($stm12,2);
         $sql2 = "select * from PA_FACT_REV_BILLED_CC
    where nip_nas='$data' and PRODUCT_LINE_ID='$rev_items'";
         $stm2 = ociparse($conn,$sql2);
         ociexecute($stm2);
         ocifetch($stm2);
    $tahun=ociresult($stm2,1);
    $bulan=ociresult($stm2,2);
    $nipnas=ociresult($stm2,3);
    $prod_line=ociresult($stm2,4);
    $rev_item=ociresult($stm2,5);
    //$revenue=ociresult($stm2,6);
    $query1 = "select standard_name from edo_customer_master_dives where nip_nas='$nipnas'";
         $st1 = ociparse($conn,$query1);
         ociexecute($st1);
         ocifetch($st1);
         $nama_cust=ociresult($st1,1);
         $query2 = "select prod_line_lname from parameter.p_prod_line@dwhnas where prod_line_id='$prod_line'";
         $st2 = ociparse($conn,$query2);
         ociexecute($st2);
         ocifetch($st2);
         $nama_prod_line=ociresult($st2,1);
         $query3 = "select REV_TYPE_LNAME from parameter.p_rev_type@dwhnas where REV_TYPE_ID='$rev_item'";
         $st3 = ociparse($conn,$query3);
         ociexecute($st3);
         ocifetch($st3);
         $nama_rev_item=ociresult($st3,1);
         $query4="select sum(total_usage) from PA_FACT_TRAFFIC_CC where PRODUCT_LINE_ID='$prod_line' and nip_nas='$nipnas' and year_id='$tahun_sajah' and month_id='$bulan_sajah' group by PRODUCT_LINE_ID";
         $st4 = ociparse($conn,$query4);
         ociexecute($st4);
         ocifetch($st4);
         $total_usage=ociresult($st4,1);
         $total=$revenue + $total_usage;
         echo $tahun." ".$bulan." ".$nama_cust." ".$nama_prod_line." ".$nama_rev_item." ".$revenue." ".$total_usage." ".$total."<br>";
         $total_revenue=$total_revenue+$total;
    $i++;
    echo $total_revenue;
    //cost of product
    $query5="select * from PA_FACT_TRAFFIC_CC where nip_nas='$nipnas' and year_id='$tahunlalu' and month_id='$bulanlalu'";
    $st5 = ociparse($conn,$query5);
         ociexecute($st5);
         $total1=0;
         $total2=0;
         $total3=0;
         $total4=0;
         $total5=0;
    while (ocifetch($st5)){
         $nipnas=ociresult($st5,3);
         $lineid=ociresult($st5,4);
         $itemid=ociresult($st5,5);
         $call=ociresult($st5,6);
         $unit=ociresult($st5,7);
         $query6 = "select prod_line_lname from parameter.p_prod_line@dwhnas where prod_line_id='$lineid'";
         $st6 = ociparse($conn,$query6);
         ociexecute($st6);
         ocifetch($st6);
         $nama_prod_line=ociresult($st6,1);
         $query7 = "select REV_item_LNAME from parameter.p_rev_item@dwhnas where REV_item_ID='$itemid'";
         $st7 = ociparse($conn,$query7);
         ociexecute($st7);
         ocifetch($st7);
         $nama_rev_item=ociresult($st7,1);
    $query8 = "select * from cost_of_product where prod_line_lname='$nama_prod_line' and REV_item_LNAME='$nama_rev_item' and end_date is null";
         $st8 = ociparse($conn,$query8);
         ociexecute($st8);
         ocifetch($st8);
         $lineid_cost=ociresult($st8,1);
         $itemid_cost=ociresult($st8,2);
         $satuan=ociresult($st8,5);
         $nilai=ociresult($st8,7);
         if (strtoupper($satuan)=='MENIT') $total1=$total1+(($unit/60)*$nilai);
         if (strtoupper($satuan)=='KBPS') $total2=$total2+($unit*$nilai);
         if (strtoupper($satuan)=='SMS') $total3=$total3+($call*$nilai);
         if (strtoupper($satuan)=='SSL') $total4=$total4+($call*$nilai);
         if (strtoupper($satuan)=='SST') $total5=$total5+($call*$nilai);
    $total_cost_pots=$total1+$total2+$total3+$total4+$total5;
    echo $total_cost_pots;
    ?>
    this script just for exp.

    Please convert step by step. for example
    (1) remove inverted quotation mark ( ` )
    (2) modify constraints syntax (PRIMARY KEY,UNIQUE KEY, KEY etc.) to [url http://download-west.oracle.com/docs/cd/B19306_01/server.102/b14200/clauses002.htm#g1053592]Oracle constraints.
    (3) modify some datatype to [url http://download-west.oracle.com/docs/cd/B19306_01/server.102/b14200/sql_elements001.htm#i45441]Oracle datatype
    (4) think how to convert auto_increment ([url http://download-west.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_6015.htm#i2067093]Sequence, [url http://download-west.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_7004.htm#i2235611]Beffore Trigger etc. on Oracle)
    http://download-west.oracle.com/docs/cd/B19306_01/appdev.102/b14251/adfns_packages.htm#sthref864
    http://download-west.oracle.com/docs/cd/B19306_01/appdev.102/b14261/toc.htm

  • Connecting my Email form to the PHP script to send to my email question

    How do I connect my form that a customer fill out to my php script?  I have my php script named contactformprocess.php. 

    anybody help?

  • Can you create a form not using a php script?

    I need to create a contact us form on my website using DW and have researched how and understand the easiest way is using a php script.  Unfortuntately, my webhost server does not support this and will charge me an arm and a leg in order to to do it.  Is there another way to have a functioning contact form not using a php script?

    Yes and no.
    You could use a mailto link for your form action instead of a PHP script.
    There are several problems with this method though. First, when you do that, you are at the mercy of the viewer's computer set-up. Mailto links use whatever email client is installed on the machine in order to send the message. Public computers (libraries, colleges, etc) almost never have an email client installed, so when a viewer on one of those machines clicks the link, nothing happens. Secondly, your email address is open for spam harvesters, so you may end up with enlargement and nigerian scam emails flooding your inbox.
    Since your provider doesn't give you a way to do it the right way on your server, you may want to look into email form services online and see if they are less expensive than your current alternative.

  • How to retrieve data from a web page through php scripts..........

    kindly suggest me the php parsing script so that i can fetch the data from a web page.....
    suppose we have a url.........
    http://abc.com/news/companydetails.aspx?sskicode=x&Exchange=y
    and the page contains the various fields.........like
    xyz 10
    xyz1 20
    xyz2 30 etc...
    then we have to retrive data from this page trough php script and insert it into database.....
    value of xyz , xyz1 n xyz2 should be retrived and further inserted into database.......
    thanx ......

    Should be nice..
    But its not working i think..

  • Uploading a file using a php script while running application with LCDS

    Hi! I developping an application under Flex 2 / Java -
    running on LCDS / JRun server.
    I'm trying to add uploading capabilities. I'm using a php
    script for the upload part.
    First, I just try to put script on the app directory. Doesn't
    work.
    After that I set up an apache server from where I put a small
    web site with my script. It's telling me that my file is
    succesfully uploaded, but I can't find the file. The apache log
    give me no error.
    Someone can help me?

    Originally, I had problems w/ the file being placed in
    C:/whatever.ext b/c I wasn't using relative paths.
    This is the code I use:
    $MAXIMUM_FILESIZE = 1024 * 1024 * 2; // 2MB
    $newFileLoc = "./wherever/file.jpg"
    if ($_FILES['Filedata']['size'] <= $MAXIMUM_FILESIZE) {
    move_uploaded_file($_FILES['Filedata']['tmp_name'],
    "./temporary/".$_FILES['Filedata']['name']);
    rename( "./temporary/".$_FILES['Filedata']['name'],
    $newFileLoc );
    chmod( $newFileLoc, 0777 );
    Modified from this article by Adobe:
    http://livedocs.adobe.com/flex/201/html/wwhelp/wwhimpl/common/html/wwhelp.htm?context=Live Docs_Book_Parts&file=17_Networking_and_communications_173_6.html

  • PHP scripts with a $_SERVER['HTTP_REFERER'] directive inside, no longer work in v16.

    I made a PHP script some time ago, before v16 came out and now that I have upgraded (good thing I did), notice that the $_SERVER['HTTP_REFERER'] directive no longer works. What my script does is, see if a user came in from a website (Facebook for example) and redirects them to the appropriate page. This is no longer the fact and I am not happy at all with this. How do I know FF 16 is at fault? Because, my script still works in IE7 and other web browsers. What have you done?????

    A good place to ask advice about web development is at the MozillaZine "Web Development/Standards Evangelism" forum.
    *http://forums.mozillazine.org/viewforum.php?f=25
    The helpers at that forum are more knowledgeable about web development issues.<br>
    You need to register at the MozillaZine forum site in order to post at that forum.

  • PHP script calling another but staying on same page

    Hi,
    Im thinking of writing an additional PHP page, that has a link to another PHP page, to do an insert. On the current PHP page, I have a counter which I would want incrementing after the 2nd PHP script is called, but don't think its possible?
    I'm saying this as I will need an anchor to another script which when called, will load another PHP script - which will do the insert, but take me away from the current page.
    So basically, I want to stay on the first PHP script showing a counter, click to call another PHP script, but all the user will see is a counter increment.
    Here is what I have thought will not work:
    <code>
    echo "<br><span class=\"style1\"><a href=\"./../Test/count.php\"><img src=\"./Up.JPG\"></a>";
    </code>
    Thanks in advance...

    Hi,
    got a bit further now in that i'm calling the php script through Ajax successfully, but, got the issue where i am getting the same value sent to the script (dataString):
    source script:
    <script type="text/javascript" >
    $(function()
    $(".submit").click(function()
      var likeid = $("#likeid").val();
      var dataString = 'likeid='+ likeid ;
      var locurl = "./../Test/it.php?randval="+Math.random();
      $.ajax({
       type: "POST",
       url: locurl,
       data: dataString,
       success: function()
        $('.success').fadeIn(200).show();
        $('.error').fadeOut(200).hide();
      return false;
    </script>
    target script (it.php)
    <?php if(!$_SESSION) { session_start(); } ?>
    <html xmlns="http://www.w3.org/1999/xhtml">
    <html>
    <head>
    </head>
    <body>
    <?php
    $_SESSION['name']=session_id();
    $sess=session_id();
    $likeid=$_POST['likeid']; <----------------------always the same value
    if($_POST)
      $result2 = mysql_query("INSERT INTO Test (value, sess) VALUES ('$likeid', '$sess')")
      or die(mysql_error());
    ?>
    </body>
    </html>
    what i get is the same value for $likeid on every call from the source script. In the source script i have:
    <form method="post" name="form1">
    <input type="hidden" name="likeid" id="likeid" value="CAR79668"/>
    <a href="#"><img src="./Up.JPG" border="0" class="submit" onclick="change11('CAR79668');"></a>
    <b id="CAR79668" value="2">2</b> </form> </span>
    <form method="post" name="form2">
    <input type="hidden" name="likeid" id="likeid" value="CAR79669"/>
    <a href="#"><img src="./Up.JPG" border="0" class="submit" onclick="change11('CAR79669');"></a>
    <b id="CAR79669" value="2">2</b> </form> </span>
    Why does the same value of CAR79668 get passed to the target script on every call?
    Thanks.

Maybe you are looking for

  • DSL modem no longer recognized by computer

    I am on dial-up right now, because I can no longer connect to the internet with my Verizon DSL ever since Windows Vista failed to update a driver a couple of weeks ago, during regular Windows Updates. I have done extensive troubleshooting and all the

  • I need a larger hard disk for my mac book pro

    Hi my mac Book pro 2.53GHz 13' needs a larger hard disk do you have any suggestion? I'm thinking about a 750/1T but which brand/model works great? I do music production. L

  • File Adapter Display

    Hi We are using SAP PI 7.0 and have 3 environments, development, test and Production. what I'm trying to find out is why the  communication channel file Adapter we have in developemt is different from the one in production. both systems are running t

  • How do I redownload a ringtone from iTunes on iOS 7

    I downloaded a ringtone earlier and now it is missing. When I go into iTunes and look in purchased it doesn't show the ringtones section.

  • 5800 Email application problem

    When I install the email application from nokia the data connection never disconnect. It is always on. I tried uninstallin and reinstalling, soft formatting, hard formattin, taking the memory card out and trying the options I just mentioned for like