Example #1
0
 function insertCoSellOrder($CoAccountNo, $AccountNo, $StockID, $OrderQuantity, $OrderPrice, $Session, $FromTypeID, $Note, $OrderDate, $IsAssigner, $IsGotPaper, $CreatedBy, $AccountNoContra, $CompanyNameContra)
 {
     $function_name = 'insertCoSellOrder';
     $struct = '{urn:' . $this->class_name . '}' . $function_name . 'Struct';
     $log[] = sprintf('insertCoSellOrder - CoAccountNo:%s;AccountNo:%s;StockID:%s;OrderQuantity:%s;OrderPrice:%s;Session:%s;FromTypeID:%s;Note:%s;OrderDate:%s;IsAssigner:%s;IsGotPaper:%s;CreatedBy:%s;AccountNoContra:%s;CompanyNameContra:%s;ExecutedTime:%s', $CoAccountNo, $AccountNo, $StockID, $OrderQuantity, $OrderPrice, $Session, $FromTypeID, $Note, $OrderDate, $IsAssigner, $IsGotPaper, $CreatedBy, $AccountNoContra, $CompanyNameContra, date('Y-m-d h:i:s'));
     if (authenUser(func_get_args(), $this, $function_name) > 0) {
         $log[] = sprintf('authenUser: ERROR_CODE: %s', $this->_ERROR_CODE);
         write_my_log_path("insertCoSellOrder", implode("\n --> ", $log), '/home/vhosts/eSMS/htdocs/logs/otc/');
         return returnXML(func_get_args(), $this->class_name, $function_name, $this->_ERROR_CODE, $this->items, $this);
     }
     $log[] = sprintf('authenUser: ERROR_CODE: %s', $this->_ERROR_CODE);
     // checking account is active / not
     if (!checkAccountIsActive($AccountNo) || !checkAccountIsActive($CoAccountNo)) {
         $this->_ERROR_CODE = 30275;
         $log[] = sprintf('checkAccountIsActive: ERROR_CODE: %s; AccountNo:%s,%s;CoAccountNo: %s,%s', $this->_ERROR_CODE, $AccountNo, checkAccountIsActive($AccountNo) ? 'TRUE' : 'FALSE', $CoAccountNo, checkAccountIsActive($CoAccountNo) ? 'TRUE' : 'FALSE');
         write_my_log_path("insertCoSellOrder", implode("\n --> ", $log), '/home/vhosts/eSMS/htdocs/logs/otc/');
         return returnXML(func_get_args(), $this->class_name, $function_name, 30275, $this->items, $this);
     }
     $log[] = sprintf('checkAccountIsActive: ERROR_CODE: %s; AccountNo:%s,%s;CoAccountNo: %s,%s', $this->_ERROR_CODE, $AccountNo, checkAccountIsActive($AccountNo) ? 'TRUE' : 'FALSE', $CoAccountNo, checkAccountIsActive($CoAccountNo) ? 'TRUE' : 'FALSE');
     if (!required($CoAccountNo) || !required($AccountNo) || !required($OrderDate) || !required($StockID) || !required($OrderQuantity) || !required($OrderPrice) || !required($Session) || !unsigned($OrderQuantity) || !unsigned($StockID)) {
         if (!required($AccountNo) || !required($CoAccountNo)) {
             $this->_ERROR_CODE = 30051;
         }
         if (!required($OrderDate)) {
             $this->_ERROR_CODE = 30052;
         }
         if (!required($StockID) || !unsigned($StockID)) {
             $this->_ERROR_CODE = 30053;
         }
         if (!required($OrderQuantity) || !unsigned($OrderQuantity)) {
             $this->_ERROR_CODE = 30054;
         }
         if (!required($Session)) {
             $this->_ERROR_CODE = 30055;
         }
         if (!required($OrderPrice)) {
             $this->_ERROR_CODE = 30056;
         }
         $log[] = sprintf('check require: ERROR_CODE: %s', $this->_ERROR_CODE);
     } else {
         $vip = checkVIPAccount($AccountNo);
         // 1: exist 0: not exist
         $vipCo = checkVIPAccount($CoAccountNo);
         // 1: exist 0: not exist
         if (($vip == 1 || $vipCo == 1) && $FromTypeID == 5) {
             // web
             $this->_ERROR_CODE = 30602;
             $log[] = sprintf('Vip on web: Fail; AccountNo: %s;CoAccountNo: %s', $vip == 0 ? 'not vip' : 'vip', $vipCo == 0 ? 'not vip' : 'vip');
             write_my_log_path("insertCoSellOrder", implode("\n --> ", $log), '/home/vhosts/eSMS/htdocs/logs/otc/');
             return returnXML(func_get_args(), $this->class_name, $function_name, $this->_ERROR_CODE, $this->items, $this);
         }
         if ((strpos(EOT_PROHIBITION_ACCOUNT, $AccountNo) !== false || strpos(EOT_PROHIBITION_ACCOUNT, $CoAccountNo) !== false) && $FromTypeID == 5) {
             $this->_ERROR_CODE = 30602;
             $log[] = sprintf('check EOT_PROHIBITION_ACCOUNT: ERROR_CODE: %s;AccountNo:%s,%s;CoAccountNo:%s,%s', $this->_ERROR_CODE, $AccountNo, strpos(EOT_PROHIBITION_ACCOUNT, $AccountNo), $CoAccountNo, strpos(EOT_PROHIBITION_ACCOUNT, $CoAccountNo));
             write_my_log_path("insertCoSellOrder", implode("\n --> ", $log), '/home/vhosts/eSMS/htdocs/logs/otc/');
             return returnXML(func_get_args(), $this->class_name, $function_name, $this->_ERROR_CODE, $this->items, $this);
         }
         if (!checkStockPrice($StockID, $OrderPrice, $OrderDate)) {
             $this->_ERROR_CODE = 30057;
         }
         $log[] = sprintf('checkStockPrice: ERROR_CODE: %s', $this->_ERROR_CODE);
         $sellingOrderID = '';
         $buyingOrderID = '';
         try {
             if ($this->_ERROR_CODE == 0) {
                 // -------------------------------------------------------------------------------------- //
                 // Insert sell order for $CoAccountNo
                 // -------------------------------------------------------------------------------------- //
                 $query = sprintf("CALL sp_upcom_insertSellingOrder('%s', %u, %u, %u, %u, '%u', '%s', '%s', '%u', '%u', '%s', '%s', '%s')", $CoAccountNo, $StockID, $OrderQuantity, $OrderPrice, $Session, $FromTypeID, $Note, $OrderDate, $IsAssigner, $IsGotPaper, $CreatedBy, $AccountNoContra, $CompanyNameContra);
                 $log[] = sprintf('%s', $query);
                 $mdb = initWriteDB();
                 $rs = $mdb->extended->getRow($query);
                 $mdb->disconnect();
                 if (empty($rs)) {
                     $this->_ERROR_CODE = 30060;
                 } else {
                     $result = $rs['varerror'];
                     if ($result < 0) {
                         switch ($result) {
                             case '-1':
                                 $this->_ERROR_CODE = 19010;
                                 break;
                             case '-2':
                                 $this->_ERROR_CODE = 19011;
                                 break;
                             case '-3':
                                 $this->_ERROR_CODE = 19012;
                                 break;
                             case '-4':
                                 $this->_ERROR_CODE = 19013;
                                 break;
                             case '-5':
                                 $this->_ERROR_CODE = 19014;
                                 break;
                             case '-6':
                                 $this->_ERROR_CODE = 19015;
                                 break;
                             default:
                                 $this->_ERROR_CODE = $result;
                         }
                     } else {
                         $sellingOrderID = $result;
                     }
                 }
                 $log[] = sprintf('ERROR_CODE: %s', $this->_ERROR_CODE);
                 $log[] = sprintf('SellingOrderID: %s', $sellingOrderID);
             }
             if ($this->_ERROR_CODE == 0) {
                 // -------------------------------------------------------------------------------------- //
                 // Insert buy order for $AccountNo
                 // -------------------------------------------------------------------------------------- //
                 $query = sprintf("CALL sp_upcom_insertBuyingOrder('%s', %u, %u, %u, %u, %u, '%s', '%s', '%u', '%u', '%s', '%s', '%s')", $AccountNo, $StockID, $OrderQuantity, $OrderPrice, $Session, $FromTypeID, $Note, $OrderDate, $IsAssigner, $IsGotPaper, $CreatedBy, $AccountNoContra, $CompanyNameContra);
                 $log[] = sprintf('%s', $query);
                 $rs = $this->_MDB2_WRITE->extended->getRow($query);
                 if (empty($rs)) {
                     $this->_ERROR_CODE = 30015;
                     $log[] = sprintf('ERROR_CODE: %s', $this->_ERROR_CODE);
                 } else {
                     $result = $rs['varerror'];
                     if ($result < 0) {
                         switch ($result) {
                             case '-1':
                                 $this->_ERROR_CODE = 19001;
                                 break;
                             case '-2':
                                 $this->_ERROR_CODE = 19002;
                                 break;
                             case '-3':
                                 $this->_ERROR_CODE = 19003;
                                 break;
                             case '-4':
                                 $this->_ERROR_CODE = 19004;
                                 break;
                             case '-5':
                                 $this->_ERROR_CODE = 19005;
                                 break;
                             default:
                                 $this->_ERROR_CODE = $result;
                         }
                         $log[] = sprintf('ERROR_CODE: %s', $this->_ERROR_CODE);
                     } else {
                         $isQuotaAccount = CheckIsQuotaAccount($AccountNo);
                         $vip = checkVIPAccount($AccountNo);
                         // 1: exist 0: not exist
                         $log[] = sprintf('ERROR_CODE: %s', $this->_ERROR_CODE);
                         $log[] = sprintf('BuyingOrderID: %s', $result);
                         $buyingOrderID = $result;
                         //block money in bank
                         $query = sprintf("SELECT * FROM vw_ListAccountBank_Detail WHERE AccountNo='%s' ORDER BY Priority ", $AccountNo);
                         $log[] = sprintf('%s', $query);
                         $mdb = initWriteDB();
                         $bank_rs = $mdb->extended->getAll($query);
                         $log[] = sprintf('PAGODA_ACCOUNT: %s', strpos(PAGODA_ACCOUNT, $AccountNo) === false ? 'FALSE' : 'TRUE');
                         $log[] = sprintf('VIP_ACCOUNT: %s', $vip == 0 ? 'FALSE' : 'TRUE');
                         if (strpos(PAGODA_ACCOUNT, $AccountNo) === false && $vip == 0) {
                             $dab_rs = 999;
                             if ($isQuotaAccount != 0) {
                                 $BankID = NHHM;
                                 $mdb = initWriteDB();
                                 $query = sprintf("CALL sp_VirtualBank_Lock('%s', %u,  %u, %f, '%s', '%s')", $AccountNo, NHHM, $result, $rs['varordervalue'], $OrderDate, $CreatedBy);
                                 $off_rs = $mdb->extended->getRow($query);
                                 $mdb->disconnect();
                                 $dab_rs = $off_rs['varerror'];
                                 $log[] = sprintf('block_money: bankid:NHHM;result:%s', $dab_rs);
                             } else {
                                 for ($i = 0; $i < count($bank_rs); $i++) {
                                     switch ($bank_rs[$i]['bankid']) {
                                         case DAB_ID:
                                             $dab =& new CDAB();
                                             $dab_rs = $dab->blockMoney($bank_rs[$i]['bankaccount'], $bank_rs[$i]['cardno'], $AccountNo, $result, $rs['varordervalue'], $OrderDate);
                                             $log[] = sprintf('block_money: bankid:DAB_ID;result:%s', $dab_rs);
                                             break;
                                         case VCB_ID:
                                             $dab =& new CVCB();
                                             $OrderID = $result . $rs['varunitcode'];
                                             if (!killStupidBank()) {
                                                 // VCB is stupid
                                                 $dab_rs = $dab->blockMoney($AccountNo, $OrderID, $rs['varordervalue']);
                                             } else {
                                                 $dab_rs = 30999;
                                             }
                                             $log[] = sprintf('block_money: bankid:VCB_ID;result:%s', $dab_rs);
                                             break;
                                         case ANZ_ID:
                                             $OrderID = $result;
                                             $query = sprintf("CALL sp_anz_money_request_lock( %u, '%s', '%s', '%s' )", $OrderID, $AccountNo, $rs['varordervalue'], $CreatedBy);
                                             $this->_MDB2_WRITE->connect();
                                             $rs1 = $this->_MDB2_WRITE->extended->getRow($query);
                                             $this->_MDB2_WRITE->disconnect();
                                             switch ($rs1['varerror']) {
                                                 case -1:
                                                     $dab_rs = 34511;
                                                     //database error
                                                     break;
                                                 case -2:
                                                     $dab_rs = 34512;
                                                     //not enough money to unlock
                                                     break;
                                                 case -3:
                                                     $dab_rs = 34513;
                                                     //account does not exist
                                                     break;
                                                 default:
                                                     $dab_rs = $rs1['varerror'];
                                             }
                                             $log[] = sprintf('block_money: bankid:ANZ_ID;result:%s', $dab_rs);
                                             // added by Quang, 20100407 ------------------------------------
                                             break;
                                         case OFFLINE:
                                             //inAccountNo varchar(20),inBankID int,inOrderID bigint,inOrderAmount double,inOrderDate date,inCreatedBy
                                             $mdb = initWriteDB();
                                             $query = sprintf("CALL sp_VirtualBank_Lock('%s', %u,  %u, %f, '%s', '%s')", $AccountNo, OFFLINE, $result, $rs['varordervalue'], $OrderDate, $CreatedBy);
                                             $off_rs = $mdb->extended->getRow($query);
                                             $mdb->disconnect();
                                             $dab_rs = $off_rs['varerror'];
                                             $log[] = sprintf('block_money: bankid:OFFLINE;result:%s', $dab_rs);
                                             break;
                                             // end add -----------------------------------------------------
                                     }
                                     if ($dab_rs == 0) {
                                         $BankID = $bank_rs[$i]['bankid'];
                                         break;
                                     }
                                 }
                             }
                         } else {
                             $dab_rs = 0;
                         }
                         if ($dab_rs == 0) {
                             //Successfully
                             $log[] = sprintf('successded_block_money');
                             $mdb = initWriteDB();
                             if ($Session <= 3) {
                                 $query = sprintf("CALL sp_updateBuyingOrderFromPendingToApproved(%u, %u) ", $result, $BankID);
                             } else {
                                 $query = sprintf("CALL sp_updateBuyingOrderFromPendingToTransfered(%u, %u) ", $result, $BankID);
                             }
                             $log[] = sprintf('%s', $query);
                             $status_rs = $mdb->extended->getRow($query);
                             $mdb->disconnect();
                             if (empty($status_rs)) {
                                 $this->_ERROR_CODE = 30143;
                             } else {
                                 $result = $status_rs['varerror'];
                                 if ($result < 0) {
                                     //update Order Status fail
                                     switch ($result) {
                                         case '-1':
                                             $this->_ERROR_CODE = 30141;
                                             break;
                                         case '-2':
                                             $this->_ERROR_CODE = 30142;
                                             break;
                                     }
                                     //switch
                                 }
                                 // if
                             }
                             // if WS
                             $log[] = sprintf('ERROR_CODE: %s', $this->_ERROR_CODE);
                         } else {
                             // bank fail
                             $log[] = sprintf('failed_block_money');
                             switch ($dab_rs) {
                                 case '-1':
                                     $this->_ERROR_CODE = 41020;
                                     break;
                                 case '-2':
                                     $this->_ERROR_CODE = 41021;
                                     break;
                                 case '-3':
                                     $this->_ERROR_CODE = 41022;
                                     break;
                                 case '-4':
                                     $this->_ERROR_CODE = 41023;
                                     break;
                                 case '-5':
                                     $this->_ERROR_CODE = 41024;
                                     break;
                                 case '1':
                                     $this->_ERROR_CODE = 41025;
                                     break;
                                 case '2':
                                     $this->_ERROR_CODE = 41026;
                                     break;
                                 case '3':
                                     $this->_ERROR_CODE = 41027;
                                     break;
                                 case '4':
                                     $this->_ERROR_CODE = 41028;
                                     break;
                                 case '5':
                                     $this->_ERROR_CODE = 41030;
                                     break;
                                 case '99':
                                     $this->_ERROR_CODE = 41029;
                                     break;
                                 default:
                                     $this->_ERROR_CODE = $dab_rs;
                             }
                             $log[] = sprintf('ERROR_CODE: %s', $this->_ERROR_CODE);
                             $mdb = initWriteDB();
                             $query = sprintf("CALL sp_updateBuyingOrderFromPendingToDenied(%u, '%s') ", $result, $dab_rs);
                             $log[] = sprintf('%s', $query);
                             $status_rs = $mdb->extended->getRow($query);
                             $mdb->disconnect();
                             if (empty($status_rs)) {
                                 $this->_ERROR_CODE = 30144;
                             } else {
                                 $result = $status_rs['varerror'];
                                 if ($result < 0) {
                                     //update Order Status fail
                                     switch ($result) {
                                         case '-1':
                                             $this->_ERROR_CODE = 30145;
                                             break;
                                         case '-2':
                                             $this->_ERROR_CODE = 30146;
                                             break;
                                     }
                                     //switch
                                 }
                                 // if
                             }
                             // if WS
                             $log[] = sprintf('ERROR_CODE: %s', $this->_ERROR_CODE);
                         }
                     }
                 }
                 // -------------------------------------------------------------------------------------- //
                 // End Insert buy order for $AccountNo
                 // -------------------------------------------------------------------------------------- //
             }
             $this->items[0] = new SOAP_Value('item', $struct, array("BuyingOrderID" => new SOAP_Value("BuyingOrderID", "string", $buyingOrderID), "SellingOrderID" => new SOAP_Value("SellingOrderID", "string", $sellingOrderID)));
         } catch (Exception $e) {
             $log[] = sprintf('Exception: %s', $e->getMessage());
             $this->_ERROR_CODE = 30060;
         }
     }
     write_my_log_path("insertCoSellOrder", implode("\n --> ", $log), '/home/vhosts/eSMS/htdocs/logs/otc/');
     return returnXML(func_get_args(), $this->class_name, $function_name, $this->_ERROR_CODE, $this->items, $this);
 }
Example #2
0
 function unLockForVirtualBank($AccountID, $LockID, $BankID, $LockAmount, $UpdatedBy)
 {
     $function_name = 'unLockForVirtualBank';
     $struct = '{urn:' . $this->class_name . '}' . $function_name . 'Struct';
     if (authenUser(func_get_args(), $this, $function_name) > 0) {
         return returnXML(func_get_args(), $this->class_name, $function_name, $this->_ERROR_CODE, $this->items, $this);
     }
     if (!required($AccountID) || !required($LockID) || !required($LockAmount) || !required($BankID)) {
         if (!required($AccountID)) {
             $this->_ERROR_CODE = 34460;
         }
         if (!required($LockID)) {
             $this->_ERROR_CODE = 34461;
         }
         if (!required($LockAmount)) {
             $this->_ERROR_CODE = 34462;
         }
         if (!required($BankID)) {
             $this->_ERROR_CODE = 34463;
         }
     } else {
         $query = sprintf("CALL sp_VirtualBank_UnLock(%u, %u, %u, %f, '%s')", $AccountID, $LockID, $BankID, $LockAmount, $UpdatedBy);
         $rs = $this->_MDB2_WRITE->extended->getRow($query);
         if (empty($rs)) {
             $this->_ERROR_CODE = 34464;
         } else {
             $result = $rs['varerror'];
             if ($result < 0) {
                 switch ($result) {
                     case '-1':
                         $this->_ERROR_CODE = 34465;
                         break;
                     case '-2':
                         $this->_ERROR_CODE = 34466;
                         break;
                     case '-3':
                         $this->_ERROR_CODE = 34467;
                         break;
                     case '-4':
                         $this->_ERROR_CODE = 34468;
                         break;
                 }
             }
         }
     }
     return returnXML(func_get_args(), $this->class_name, $function_name, $this->_ERROR_CODE, $this->items, $this);
 }
Example #3
0
function ticket_form($action)
{
    global $conn;
    $users = Session::get_users_to_assign($conn);
    if (Session::is_pro()) {
        $entities = Acl::get_entities_to_assign($conn);
    }
    ?>
	<tr class="tticket">
	   <td colspan="2" class="nobborder">&nbsp;</td>
	</tr>
	<tr class="tticket">
		<th><label for="in_charge"><?php 
    echo _('In Charge:') . required();
    ?>
</label></th>
		<td class="nobborder left">
			<table cellspacing="0" cellpadding="0" class="transparent">
                <tr>
                    <td class="nobborder">
                        <label for="transferred_user"><?php 
    echo _('User:'******'set_focus(this);' name="transferred_user" id="transferred_user" class="vfield" onchange="switch_user('user');return false;">
                        <?php 
    $num_users = 0;
    foreach ($users as $k => $v) {
        $login = $v->get_login();
        $options .= "<option value='{$login}'" . ($action == $login ? " selected" : "") . ">{$login}</option>\n";
        $num_users++;
    }
    if ($num_users == 0) {
        echo "<option value='' style='text-align:center !important;'>- " . _("No users found") . "- </option>";
    } else {
        echo "<option value='' style='text-align:center !important;' selected='selected'>- " . _("Select one user") . " -</option>\n";
        echo $options;
    }
    ?>
                        </select>
                    </td>
                
                <?php 
    if (!empty($entities)) {
        ?>
                    <td class="nobborder" nowrap='nowrap'>
                        <label for="transferred_entity" style='margin-right: 3px;'><?php 
        echo _('OR') . ' ' . _('Entity:');
        ?>
</label>
                    </td>
                    <td class="nobborder">
                        <select onfocus='set_focus(this);' name="transferred_entity" id="transferred_entity" class="vfield" onchange="switch_user('entity');return false;">
                        <?php 
        if (count($entities) == 0) {
            echo "<option value='' style='text-align:center !important;'>- " . _('No entities found') . " -</option>";
        } else {
            echo "<option value='' style='text-align:center !important;'>- " . _('Select one entity') . " -</option>\n";
        }
        foreach ($entities as $k => $v) {
            echo "<option value='{$k}'" . ($action == $k ? " selected" : "") . ">{$v}</option>";
        }
        ?>
                        </select>
                    </td>
                <?php 
    }
    ?>
                </tr>
			</table>
		</td>
	</tr>
    <?php 
}
Example #4
0
    foreach ($locations as $lc) {
        echo "<option value='" . $lc->get_id() . "'>" . $lc->get_name() . "</option>";
    }
    ?>
                            </select>
                        </td>
                    </tr>
                    <?php 
} else {
    if (Session::show_entities()) {
        $e_url = Menu::get_menu_url('../acl/entities.php', 'configuration', 'administration', 'users', 'structure');
        ?>
                        <tr>
                            <th>
                                <label for='entities'><?php 
        echo _('Context') . required();
        ?>
</label><br/>
                            </th>

                            <td class="nobborder">
                                <table id='t_entities' class="transparent">
                                    <tr>
                                        <td class="noborder left">
                                            <div id="tree"></div>
                                        </td>
                                    </tr>
                                    <?php 
        if ($is_ossim_sensor) {
            $entity_id = $entity_name = "";
            if (is_array($sensor_entities)) {
Example #5
0
 function confirmInternalTransfer($ID, $UpdatedBy, $FromAccountNo, $ToAccountNo, $Amount)
 {
     $function_name = 'confirmInternalTransfer';
     $struct = '{urn:' . $this->class_name . '}' . $function_name . 'Struct';
     if (authenUser(func_get_args(), $this, $function_name) > 0) {
         return returnXML(func_get_args(), $this->class_name, $function_name, $this->_ERROR_CODE, $this->items, $this);
     }
     if (!required($ID) || !unsigned($ID) || !required($FromAccountNo) || !required($ToAccountNo) || !required($Amount) || !unsigned($Amount)) {
         if (!required($ID) || !unsigned($ID)) {
             $this->_ERROR_CODE = 13175;
         }
         if (!required($FromAccountNo)) {
             $this->_ERROR_CODE = 13176;
         }
         if (!required($ToAccountNo)) {
             $this->_ERROR_CODE = 13177;
         }
         if (!required($Amount) || !unsigned($Amount)) {
             $this->_ERROR_CODE = 13178;
         }
     } else {
         $query = sprintf("CALL sp_VirtualBank_confirmInternalTransfer(%u, '%s' )", $ID, $UpdatedBy);
         $rs = $this->_MDB2_WRITE->extended->getRow($query);
         if (empty($rs)) {
             $this->_ERROR_CODE = 13179;
         } else {
             $result = $rs['varerror'];
             $content = date("d/m/Y H:i:s") . "\tChuyen khoan: ID => {$ID}, FromAccountNo => {$FromAccountNo}, ToAccountNo => {$ToAccountNo}, Amount => {$Amount}, UpdatedBy => {$UpdatedBy} --> {$result}";
             write_log($function, $content, VIRTUAL_BANK_LOG_FILE_PATH);
             if ($result < 0) {
                 switch ($result) {
                     case '-1':
                         $this->_ERROR_CODE = 13180;
                         break;
                     case '-2':
                         $this->_ERROR_CODE = 13181;
                         break;
                     case '-3':
                         $this->_ERROR_CODE = 13182;
                         break;
                     case '-4':
                         $this->_ERROR_CODE = 13183;
                         break;
                     case '-5':
                         $this->_ERROR_CODE = 13184;
                         break;
                     case '-6':
                         $this->_ERROR_CODE = 13185;
                         break;
                     default:
                         $this->_ERROR_CODE = $result;
                 }
                 //switch
             } else {
                 //if
                 $soap =& new Bravo();
                 $date = date("Y-m-d");
                 $withdrawValue = array("TradingDate" => $date, 'TransactionType' => INTERNAL_TRANSFER, "AccountNo" => $FromAccountNo, "Amount" => $Amount, "Fee" => 0, "Bank" => VIRTUAL_BANK_BANKCODE, "Note" => "Chuyen khoan");
                 $ret = $soap->withdraw($withdrawValue);
                 if ($ret['table0']['Result'] != 1) {
                     // success
                     switch ($ret['table0']['Result']) {
                         case '-2':
                             $this->_ERROR_CODE = 23002;
                             break;
                         case '-1':
                             $this->_ERROR_CODE = 23003;
                             break;
                         case '-13':
                             $this->_ERROR_CODE = 23006;
                             break;
                         case '-15':
                             $this->_ERROR_CODE = 23005;
                             break;
                         case '-16':
                             $this->_ERROR_CODE = 23004;
                             break;
                         default:
                             $this->_ERROR_CODE = 'Bravo' . $ret['table0']['Result'];
                     }
                     //switch
                 } else {
                     $arrDeposit = array("TradingDate" => $date, "TransactionType" => INTERNAL_TRANSFER, "AccountNo" => $ToAccountNo, "Amount" => $Amount, "Fee" => 0, "Bank" => VIRTUAL_BANK_BANKCODE, "Note" => "Chuyen khoan");
                     $bravo_result = $bravo_service->deposit($arrDeposit);
                     if ($bravo_result['table0']['Result'] != 1) {
                         switch ($result) {
                             case '-1':
                                 $this->_ERROR_CODE = 23003;
                                 break;
                             case '-2':
                                 $this->_ERROR_CODE = 23002;
                                 break;
                             case '-13':
                                 $this->_ERROR_CODE = 23006;
                                 break;
                             case '-15':
                                 $this->_ERROR_CODE = 23005;
                                 break;
                             case '-16':
                                 $this->_ERROR_CODE = 23004;
                                 break;
                         }
                         //switch
                     }
                     //if
                 }
                 //else
             }
         }
         //if WS
     }
     return returnXML(func_get_args(), $this->class_name, $function_name, $this->_ERROR_CODE, $this->items, $this);
 }
echo form_tag('user/editAccount', array('class' => 'form'));
?>
    <div class="row">
        <?php 
echo label_for('first_name', __('First Name') . required());
?>
        <?php 
echo input_tag('first_name', $sf_params->get('first_name'));
?>
        <?php 
echo form_error('first_name');
?>
    </div>
    <div class="row">
        <?php 
echo label_for('last_name', __('Last Name') . required());
?>
        <?php 
echo input_tag('last_name', $sf_params->get('last_name'));
?>
        <?php 
echo form_error('last_name');
?>
    </div>
    <div class="row">
        <?php 
echo label_for('gender', __('Gender'));
?>
        <?php 
echo select_tag('gender', options_for_select(array(null, 'M' => __('Male'), 'F' => __('Female')), $sf_params->get('gender')));
?>
Example #7
0
echo _('Name') . required();
?>
</label>
    			</th>
    			<td class="left">
    				<input type="text" class='vfield' name="ri_name" id="ri_name" value="<?php 
echo $name;
?>
"/>
    			</td>
    		</tr>
    		
    		<tr>
    			<th>
    				<label for='status'><?php 
echo _('Status') . required();
?>
</label>
    			</th>
    			<td class="left">
    				<?php 
$checked = $status == 1 ? " checked='checked' " : "";
?>
    				<input type="checkbox" value="1" <?php 
echo $checked;
?>
 name="status"/>
    			</td>
    		</tr>
    	  
    		<tr>
Example #8
0
						</td>
					</tr>					
					<?php 
} elseif ($s_type == 'wmi') {
    preg_match('/wmipass:(.*)/', $params, $found);
    if ($found[1] != '') {
        $params = preg_replace('/wmipass:(.*)/', '', $params);
        $_SESSION['wmi_pass'] = $found[1];
        $params = $params . 'wmipass:'******'/./', '*', $found[1]);
    }
    $title = _('Format example') . ': wmihost:<i>ip_address</i>;wmiuser:<i>user</i>;wmipass:<i>pass</i>';
    ?>
					<tr>
						<th>
						    <label for="task_params"><?php 
    echo _('Credentials') . required();
    ?>
</label>
						</th>
						<td class="left">
							<input type='text' name='task_params' title="<?php 
    echo $title;
    ?>
" id='task_params' class='vfield info' value="<?php 
    echo $params;
    ?>
"/>
						</td>
					</tr>
					<?php 
}
			<h2>
				<div class='finished'>
					<div class='div_left'><?php 
    echo _("INSTALL ON");
    ?>
</div>
					<div class='div_right'><img src="../pixmaps/tables/warning.png" class="imgtargets img_rotate" /></div>
					<div class='div_right'><img src="../pixmaps/trash.png" class="img_delc img_rotate" /></div>
				</div>
			</h2>
			<div id="cond-7">
				
				<table class='tab_table'>
					<tr>
						<th><?php 
    echo _("Install on") . required();
    ?>
<br/>
							<span class='size10'><a href="../server/newserverform.php" class="greybox"><?php 
    echo _("Insert new server?");
    ?>
</a></span><br/>
						</th>
						<td class="left nobborder" valign="top" id="targets">
						</td>
					</tr>
				</table>
				
			</div>
		</li>
		
$this->load->view('account/_account_header');
?>

	<div>
		<h3><?php 
echo lang('email_settings');
?>
</h3>

		<?php 
echo form_open('C=myaccount' . AMP . 'M=update_email', '', $form_hidden);
?>

		<p>
			<?php 
echo form_label(required() . lang('email'), 'email');
?>
			<?php 
echo form_input(array('id' => 'email', 'name' => 'email', 'class' => 'field', 'value' => $email, 'maxlength' => 72));
?>
		</p>

		
		<p>
			<em class="notice">
				<?php 
if ($this->session->userdata('group_id') == 1) {
    ?>
					<?php 
    echo lang('password_auth');
    ?>
 /**
  * Function CancelSellAdvance_DAB	: CancelSellAdvance_DAB
  * Input 					: $DABBankAccount, $AccountNo, $ContractNo
  * OutPut 					: error code. Return 0 if success else return error code (number >0).
  */
 function CancelSellAdvance_DAB($DABBankAccount, $AccountNo, $ContractNo, $CancelDate)
 {
     try {
         $class_name = $this->class_name;
         $function_name = 'CancelSellAdvance_DAB';
         if (authenUser(func_get_args(), $this, $function_name) > 0) {
             return returnXML(func_get_args(), $this->class_name, $function_name, $this->_ERROR_CODE, $this->items, $this);
         }
         if (!required($DABBankAccount)) {
             $this->_ERROR_CODE = 20066;
         } else {
             if (!required($AccountNo)) {
                 $this->_ERROR_CODE = 20067;
             } else {
                 if (!required($ContractNo)) {
                     $this->_ERROR_CODE = 20068;
                 }
             }
         }
         if ($this->_ERROR_CODE == 0) {
             $dab =& new CDAB();
             $dab_rs = $dab->cancelsellAdvance($DABBankAccount, $AccountNo, $ContractNo);
             switch ($dab_rs) {
                 case '0':
                     //sucess
                     $this->_ERROR_CODE = 0;
                     break;
                 case '-1':
                     //unauthenticate partner
                     $this->_ERROR_CODE = 20053;
                     break;
                 case '-2':
                     //Iinvalid parameters
                     $this->_ERROR_CODE = 20054;
                     break;
                 case '-3':
                     //no contract found or invalid contract
                     $this->_ERROR_CODE = 20064;
                     break;
                 case '-1':
                     //cancel sell unsuccessful
                     $this->_ERROR_CODE = 20065;
                     break;
                 case '99':
                     //unknown error
                     $this->_ERROR_CODE = 20056;
                     break;
                 default:
                     //deafulr error
                     $this->_ERROR_CODE = 20057;
                     break;
             }
             /*if($this->_ERROR_CODE==0)
             				{
             					$query = sprintf("CALL sp_DeleteAdvancePaper_DAB ('%s','%s','%s')", $ContractNo, $CancelDate, $CreatedBy);
             					$this->_MDB2_WRITE->disconnect();
             					$this->_MDB2_WRITE->connect();
             					$result = $this->_MDB2_WRITE->extended->getAll($query);
             					//Can not delete
             					if(empty($result) || is_object($result)){
             						$this->_ERROR_CODE = 20061;
             						write_my_log_path('ErrorCallStore',$query.'  '.$result->backtrace[0]['args'][4],ADVANCE_PATH);
             					}
             					else{
             						if(isset($result[0]['varerror']))
             						{
             							//Invalid AdvancePaper
             							if($result[0]['varerror'] == -1){
             								 $this->_ERROR_CODE = 20001;
             							}else if($result[0]['varerror'] == -3){
             								//error when call sp_insertMoneyHistory
             								 $this->_ERROR_CODE = 20062;
             							}else if($result[0]['varerror'] == -9999){
             								 $this->_ERROR_CODE = 20063;
             							}else if($result[0]['varerror']<0){
             								$this->_ERROR_CODE = 22134;
             								write_my_log_path($function_name,$query.'  VarError '.$result[0]['varerror'],ADVANCE_PATH);
             							}
             
             						}
             					}
             				}
             				*/
         }
     } catch (Exception $e) {
         write_my_log_path('PHP-Exception', $function_name . ' Caught exception: ' . $e->getMessage() . ' ' . date('Y-m-d h:i:s'), DEBUG_PATH);
         $this->_ERROR_CODE = 23022;
     }
     return returnXML(func_get_args(), $this->class_name, $function_name, $this->_ERROR_CODE, $this->items, $this);
 }
&withoutmenu=<?php 
echo GET('withoutmenu');
?>
" method="POST" style="margin:0px" onsubmit="return chk()">
<table align="center" width="90%" cellspacing="0" class="noborder">
    <tr>
        <td width="10%" height="34" class="plfieldhdr pall" nowrap><?php 
echo _("Group ID");
?>
</td>
        <td width="22%" height="34" class="plfieldhdr ptop pbottom pright"><?php 
echo _("Group Name") . required();
?>
</td>
        <td width="63%" height="34" class="plfieldhdr ptop pbottom pright"><?php 
echo _("Description") . required();
?>
</td>
    </tr>
    <tr>
        <td class="noborder pleft"><b><?php 
echo $group_id;
?>
</b>&nbsp;</td>
        <td class="noborder">
            <input type="text" name="name" id="pname" value="<?php 
echo $name;
?>
" size="30">
        </td>
        <td class="noborder pright">
Example #13
0
 function InsertExtraCollectDisbursement($AccountID, $Amount, $BankID, $TradingDate, $Note, $TranTypeID, $CreatedBy)
 {
     $function_name = 'InsertExtraCollectDisbursement';
     $struct = '{urn:' . $this->class_name . '}' . $function_name . 'Struct';
     if (authenUser(func_get_args(), $this, $function_name) > 0) {
         return returnXML(func_get_args(), $this->class_name, $function_name, $this->_ERROR_CODE, $this->items, $this);
     }
     if (!required($AccountID) || !unsigned($AccountID) || !required($Amount) || !unsigned($Amount)) {
         if (!required($AccountID) || !unsigned($AccountID)) {
             $this->_ERROR_CODE = 31445;
         }
         if (!required($Amount) || !unsigned($Amount)) {
             $this->_ERROR_CODE = 31446;
         }
     } else {
         $query = sprintf("CALL sp_ExtraCollectDisbursement_insert( %u, %f, '%s', '%s', '%s', '%s', '%s')", $AccountID, $Amount, $BankID, $TradingDate, $Note, $TranTypeID, $CreatedBy);
         $rs = $this->_MDB2_WRITE->extended->getRow($query);
         if (empty($rs)) {
             $this->_ERROR_CODE = 31447;
         } else {
             $result = $rs['varerror'];
             if ($result < 0) {
                 switch ($result) {
                     case '-1':
                         $this->_ERROR_CODE = 21115;
                         break;
                 }
             } else {
                 $this->items[0] = new SOAP_Value('item', $struct, array("ID" => new SOAP_Value("ID", "string", $result)));
             }
         }
     }
     return returnXML(func_get_args(), $this->class_name, $function_name, $this->_ERROR_CODE, $this->items, $this);
 }
Example #14
0
		<td class="left">
			<input type="password" id="pass1" name="pass1" value="<?php 
echo $pass1;
?>
" size="30" />
		</td>
	</tr>
	
	<tr>
		<td class="nobborder" style="padding:0px"></td>
		<td class="nobborder" style="padding:0px"><div id="pass1_text"></div><div id="pass1_bar"></div></td>
	</tr>
  
	<tr>
		<th> <?php 
echo _("Re-enter password") . required();
?>
 </th>
		<td class="left">
			<input type="password" id="pass2" name="pass2" value="<?php 
echo $pass2;
?>
" size="30" />
		</td>
	</tr>
	
	<tr>
		<th> <?php 
echo gettext("User language");
?>
</th>
?>
    <div class="row">
        <?php 
echo label_for('username', __('Username') . required());
?>
        <?php 
echo input_tag('username', $sf_params->get('username'));
?>
<br />
        <?php 
echo form_error('username', 'class=error');
?>
    </div>
    <div class="row">
        <?php 
echo label_for('password', __('Password') . required());
?>
        <?php 
echo input_password_tag('password');
?>
<br />
        <?php 
echo form_error('password', 'class=error');
?>
 
    </div>
    <div class="row">
        <?php 
echo label_for('remember', __('Remember me?'));
?>
        <?php 
 function insertBuyingStockDivident($AccountID, $BankID, $Amount, $DepositDate, $Note, $CreatedBy)
 {
     $function_name = 'insertBuyingStockDivident';
     $struct = '{urn:' . $this->class_name . '}' . $function_name . 'Struct';
     if (authenUser(func_get_args(), $this, $function_name) > 0) {
         return returnXML(func_get_args(), $this->class_name, $function_name, $this->_ERROR_CODE, $this->items, $this);
     }
     if (!required($AccountID) || !unsigned($AccountID) || !required($BankID) || !unsigned($BankID) || !required($Amount) || !unsigned($Amount) || !required($DepositDate)) {
         if (!required($AccountID) || !unsigned($AccountID)) {
             $this->_ERROR_CODE = 22230;
         }
         if (!required($BankID) || !unsigned($BankID)) {
             $this->_ERROR_CODE = 22231;
         }
         if (!required($Amount) || !unsigned($Amount)) {
             $this->_ERROR_CODE = 22232;
         }
         if (!required($DepositDate)) {
             $this->_ERROR_CODE = 22233;
         }
     } else {
         $query = sprintf("CALL sp_VirtualBank_insertBuyingStockDivident(%u, %u, %f, '%s', '%s', '%s' )", $AccountID, $BankID, $Amount, $DepositDate, $Note, $CreatedBy);
         $rs = $this->_MDB2_WRITE->extended->getRow($query);
         if (empty($rs)) {
             $this->_ERROR_CODE = 22234;
         } else {
             $result = $rs['varerror'];
             if ($result < 0) {
                 switch ($result) {
                     case '-1':
                         $this->_ERROR_CODE = 22235;
                         break;
                     case '-2':
                         $this->_ERROR_CODE = 22236;
                         break;
                     case '-3':
                         $this->_ERROR_CODE = 22237;
                         break;
                     case '-4':
                         $this->_ERROR_CODE = 22238;
                         break;
                     case '-5':
                         $this->_ERROR_CODE = 22239;
                         break;
                     case '-9':
                         $this->_ERROR_CODE = 22240;
                         break;
                     default:
                         $this->_ERROR_CODE = $result;
                 }
             }
         }
     }
     return returnXML(func_get_args(), $this->class_name, $function_name, $this->_ERROR_CODE, $this->items, $this);
 }
Example #17
0
    <tr>
        <td class="left">
            <input type='text' name='task_params' data-title="<?php 
echo $title;
?>
" id='task_params' class='vfield info' value="<?php 
echo $params;
?>
"/>
        </td>
    </tr>

    <tr>
        <td class="left">
            <label for="task_period"><?php 
echo _('Frequency') . required();
?>
</label>
        </td>
    </tr>
    <tr>
        <td class="left">
            <select name="task_period" id="task_period" class='vfield'>
                <?php 
foreach ($frequencies as $f_seconds => $f_name) {
    $selected = $period == $f_seconds ? 'selected="selected"' : '';
    echo "<option value='{$f_seconds}' {$selected}>{$f_name}</option>";
}
?>
            </select>
        </td>
Example #18
0
 function OpenAccount1($PersonalCard, $Name, $Address, $BankAccountNo, $PartnerType, $dtBirthDay, $PlaceOfBirth, $dtDateIssue, $PlaceIssue, $ZipCode, $Country, $Email, $Phone, $Fax, $CompanyAddress, $CompanyPhone, $MailingAddress, $MailingPhone)
 {
     $class_name = $this->class_name;
     $function_name = 'OpenAccount1';
     $this->_ERROR_CODE = '0000';
     if (0) {
         //authenUser(func_get_args(), $this, $function_name) > 0 ){
         $Name = '';
         $Address = '';
         $Account = '';
         $Status = '';
         $RespString = 'Invalid user/Password';
         $OldNewAccount = '';
         write_my_log('VCB-test', $_SERVER['REMOTE_ADDR'] . ' function_name ' . $function_name . ' Input PersonalCard ' . $PersonalCard . ' Name ' . $Name . ' Address ' . $Address . ' BankAccountNo ' . $BankAccountNo . ' PartnerType ' . $PartnerType . ' dtBirthDay ' . $dtBirthDay . ' PlaceOfBirth ' . $PlaceOfBirth . ' dtDateIssue ' . $dtDateIssue . ' PlaceIssue ' . $PlaceIssue . ' ZipCode ' . $ZipCode . ' Country ' . $Country . ' Email ' . $Email . ' Phone ' . $Phone . ' Fax ' . $Fax . ' CompanyAddress ' . $CompanyAddress . ' CompanyPhone ' . $CompanyPhone . ' MailingAddress ' . $MailingAddress . ' MailingPhone ' . $MailingPhone . ' ErrorCode ' . $this->_ERROR_CODE . ' ' . date('Y-m-d h:i:s'));
         mailSMTP('*****@*****.**', '*****@*****.**', '*****@*****.**', '', '', 'Ket noi VietCombank test', 'Test ket noi VietComBank ' . $_SERVER['REMOTE_ADDR'] . ' function_name ' . $function_name . ' Input PersonalCard ' . $PersonalCard . ' Name ' . $Name . ' Address ' . $Address . ' BankAccountNo ' . $BankAccountNo . ' PartnerType ' . $PartnerType . ' dtBirthDay ' . $dtBirthDay . ' PlaceOfBirth ' . $PlaceOfBirth . ' dtDateIssue ' . $dtDateIssue . ' PlaceIssue ' . $PlaceIssue . ' ZipCode ' . $ZipCode . ' Country ' . $Country . ' Email ' . $Email . ' Phone ' . $Phone . ' Fax ' . $Fax . ' CompanyAddress ' . $CompanyAddress . ' CompanyPhone ' . $CompanyPhone . ' MailingAddress ' . $MailingAddress . ' MailingPhone ' . $MailingPhone . ' ErrorCode ' . $this->_ERROR_CODE . ' ' . date('Y-m-d h:i:s') . ' ErrorCode ' . $this->_ERROR_CODE);
         $array_input['PersonalCard'] = new SOAP_Value('PersonalCard', 'string', $PersonalCard);
         $array_input['Name'] = new SOAP_Value('Name', 'string', $Name);
         $array_input['Account'] = new SOAP_Value('Account', 'string', $Account);
         $array_input['State'] = new SOAP_Value('State', 'string', $State);
         $array_input['ResponseCode'] = new SOAP_Value('ResponseCode', 'string', $this->_ERROR_CODE);
         $array_input['RespString'] = new SOAP_Value('RespString', 'string', $RespString);
         $array_input['OldNewAccount'] = new SOAP_Value('OldNewAccount', 'string', $OldNewAccount);
         return returnXML(func_get_args(), $this->class_name, $function_name, $array_input, $this);
     }
     if (!required($Name)) {
         $this->_ERROR_CODE = 8013;
         $RespString = 'Name is null';
     }
     if ($this->_ERROR_CODE == '0000' && !required($BankAccountNo)) {
         $this->_ERROR_CODE = 8016;
         $RespString = 'BankAccountNo is null';
     }
     if ($this->_ERROR_CODE == '0000' && !required($PersonalCard)) {
         $this->_ERROR_CODE = 8072;
         $RespString = 'PersonalCard is null';
     }
     if ($this->_ERROR_CODE == '0000' && isset($PartnerType) && strlen($PartnerType) > 0 && !in_array($PartnerType, array('C', 'F', 'P'))) {
         $this->_ERROR_CODE = 8028;
         $RespString = 'Invalid PartnerType';
     }
     if ($this->_ERROR_CODE == '0000') {
         $BankName = 'VietComBank';
         $pos = strpos($Name, ' ');
         $FirstName = substr($Name, 0, $pos + 1);
         $LastName = substr($Name, $pos + 1);
         $query = sprintf("CALL Sp_aaaaOpenPrivateAccount_VCB\r\n('%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s')", $FirstName, $LastName, $PartnerType, $Address, $MailingAddress, $Phone, $MailingPhone, $Email, $dtBirthDay, $PersonalCard, $dtDateIssue, $PlaceIssue, 'F', $BankAccountNo, $Country, $BankName);
         $result = $this->_MDB2_WRITE->extended->getAll($query);
         $this->_MDB2_WRITE->disconnect();
         $Name = '';
         $Address = '';
         $Account = '';
         $Status = '';
         $RespString = '';
         $OldNewAccount = '';
         if (empty($result) || is_object($result)) {
             $this->_ERROR_CODE = 8049;
         } else {
             if (isset($result[0]['varerror'])) {
                 if ($result[0]['varerror'] == -1) {
                     $this->_ERROR_CODE = 8051;
                     //exception
                     $RespString = 'EPS-err : exception';
                 }
                 //if($result[0]['varerror'] == -2) $this->_ERROR_CODE = 18052;// duplicate cardno
                 if ($result[0]['varerror'] == -3) {
                     $this->_ERROR_CODE = 8053;
                     //invalid countryName
                     $RespString = 'EPS-err invalid country name';
                 }
                 if ($result[0]['varerror'] == -4) {
                     $this->_ERROR_CODE = 8054;
                     //update account err
                     $RespString = 'EPS-err update account';
                 }
                 if ($result[0]['varerror'] == -5) {
                     $this->_ERROR_CODE = 8055;
                     //insert investor err
                     $RespString = 'EPS-err insert Investor';
                 }
                 if ($result[0]['varerror'] == -6) {
                     $this->_ERROR_CODE = 8056;
                     //ins MoneyBalance err
                     $RespString = 'EPS-err insert Balance';
                 }
                 if ($result[0]['varerror'] == -2 || $result[0]['varerror'] == 0) {
                     $Name = $result[0]['v_sfullname'];
                     $Address = $result[0]['sresidentaddress'];
                     $Account = $result[0]['v_saccountno'];
                     $Status = $result[0]['v_iisactive'] ? 'A' : 'H';
                     $OldNewAccount = $result[0]['v_icreated'] ? 0 : 1;
                     $RespString = 'Sucess';
                 }
             } else {
                 $this->_ERROR_CODE = 8049;
                 $RespString = 'EPS-err: db err';
             }
         }
     }
     $array_input['PersonalCard'] = new SOAP_Value('PersonalCard', 'string', $PersonalCard);
     $array_input['Name'] = new SOAP_Value('Name', 'string', $Name);
     $array_input['Account'] = new SOAP_Value('Account', 'string', $Account);
     $array_input['State'] = new SOAP_Value('State', 'string', $Status);
     $array_input['ResponseCode'] = new SOAP_Value('ResponseCode', 'string', $this->_ERROR_CODE);
     $array_input['RespString'] = new SOAP_Value('RespString', 'string', $RespString);
     $array_input['OldNewAccount'] = new SOAP_Value('OldNewAccount', 'string', $OldNewAccount);
     write_my_log('VCB-test', $_SERVER['REMOTE_ADDR'] . ' function_name ' . $function_name . ' Input PersonalCard ' . $PersonalCard . ' Name ' . $Name . ' Address ' . $Address . ' BankAccountNo ' . $BankAccountNo . ' PartnerType ' . $PartnerType . ' dtBirthDay ' . $dtBirthDay . ' PlaceOfBirth ' . $PlaceOfBirth . ' dtDateIssue ' . $dtDateIssue . ' PlaceIssue ' . $PlaceIssue . ' ZipCode ' . $ZipCode . ' Country ' . $Country . ' Email ' . $Email . ' Phone ' . $Phone . ' Fax ' . $Fax . ' CompanyAddress ' . $CompanyAddress . ' CompanyPhone ' . $CompanyPhone . ' MailingAddress ' . $MailingAddress . ' MailingPhone ' . $MailingPhone . ' Output Account' . $Account . ' State A ' . ErrorCode . $this->_ERROR_CODE . ' ' . date('Y-m-d h:i:s'));
     mailSMTP('*****@*****.**', '*****@*****.**', '*****@*****.**', '', '', 'Ket noi VietCombank test', 'Test ket noi VietComBank ' . $_SERVER['REMOTE_ADDR'] . ' function_name ' . $function_name . ' Input PersonalCard ' . $PersonalCard . ' Name ' . $Name . ' Address ' . $Address . ' BankAccountNo ' . $BankAccountNo . ' PartnerType ' . $PartnerType . ' dtBirthDay ' . $dtBirthDay . ' PlaceOfBirth ' . $PlaceOfBirth . ' dtDateIssue ' . $dtDateIssue . ' PlaceIssue ' . $PlaceIssue . ' ZipCode ' . $ZipCode . ' Country ' . $Country . ' Email ' . $Email . ' Phone ' . $Phone . ' Fax ' . $Fax . ' CompanyAddress ' . $CompanyAddress . ' CompanyPhone ' . $CompanyPhone . ' MailingAddress ' . $MailingAddress . ' MailingPhone ' . $MailingPhone . ' Output Account' . $Account . ' State A ' . ErrorCode . $this->_ERROR_CODE . ' ' . date('Y-m-d h:i:s'));
     return returnXML(func_get_args(), $this->class_name, $function_name, $array_input, $this);
 }
Example #19
0
 /**
 	Chi them ngay 04-03-2010
 	Function: insertTradeForHNX
 	Description: insert deal for hnx
 	Input: $'OrderQuantity', 'Session', 'FromTypeID', 'OldOrderID', 'Note', 'OrderDate', 'IsAssigner', 'CreatedBy'
 	Output: ID / error code
 */
 function insertTradeForHNX($ConfirmNo, $OrderNumber, $MatchedQuantity, $MatchedPrice, $MatchedSession, $TradingDate, $CreatedBy)
 {
     $function_name = 'insertTradeForHNX';
     $struct = '{urn:' . $this->class_name . '}' . $function_name . 'Struct';
     if (authenUser(func_get_args(), $this, $function_name) > 0) {
         return returnXML(func_get_args(), $this->class_name, $function_name, $this->_ERROR_CODE, $this->items, $this);
     }
     if (!required($ConfirmNo) || !required($OrderNumber) || !required($MatchedQuantity) || !required($MatchedPrice) || !required($MatchedSession) || !required($TradingDate)) {
         if (!required($ConfirmNo)) {
             $this->_ERROR_CODE = 99999;
         }
         if (!required($OrderNumber)) {
             $this->_ERROR_CODE = 99999;
         }
         if (!required($MatchedQuantity)) {
             $this->_ERROR_CODE = 99999;
         }
         if (!required($MatchedPrice)) {
             $this->_ERROR_CODE = 99999;
         }
         if (!required($MatchedSession)) {
             $this->_ERROR_CODE = 99999;
         }
         if (!required($TradingDate)) {
             $this->_ERROR_CODE = 99999;
         }
     } else {
         $query = sprintf("CALL sp_hnx_Trade_Insert('%s', '%s', %u, %u, %u, '%s', '%s')", $ConfirmNo, $OrderNumber, $MatchedQuantity, $MatchedPrice, $MatchedSession, $TradingDate, $CreatedBy);
         $rs = $this->_MDB2_WRITE->extended->getRow($query);
         if (empty($rs)) {
             $this->_ERROR_CODE = 999998;
         } else {
             $result = $rs['varerror'];
             if ($result < 0) {
                 switch ($result) {
                     case '-1':
                         $this->_ERROR_CODE = 999997;
                         break;
                     default:
                         $this->_ERROR_CODE = $result;
                 }
             } else {
                 $this->_ERROR_CODE = 0;
             }
         }
     }
     return returnXML(func_get_args(), $this->class_name, $function_name, $this->_ERROR_CODE, $this->items, $this);
 }
Example #20
0
        ?>
/><span>
								<label class="y_n" for="ia_no"><?php 
        echo _('No');
        ?>
</label>
							</td>
						</tr>
						<?php 
    }
    if ($pro) {
        ?>
						<!-- Menu Template -->
						<tr>
							<th><label for="template_id"><?php 
        echo _('Menu Template') . required();
        ?>
</label></th>
							<td class="nobborder">
								<select id="template_id" name="template_id" class='select_tpl vfield'>
									<?php 
        foreach ($templates as $template) {
            $selected = $template_id == $template['id'] ? "selected='selected'" : '';
            ?>
										<option value="<?php 
            echo $template['id'];
            ?>
" <?php 
            echo $selected;
            ?>
><?php 
Example #21
0
<?php $this->load->view('account/_account_header');?>

	<div>
		<h3><?=lang('email_settings')?></h3>

		<?=form_open('C=myaccount'.AMP.'M=update_email', '', $form_hidden)?>

		<p>
			<?=form_label(required().lang('email'), 'email')?>
			<?=form_input(array('id'=>'email','name'=>'email','class'=>'field','value'=>$email,'maxlength'=>72))?>
		</p>

		<?php if ($this->session->userdata('group_id') != 1):?>
		<p><em class="notice"><?=lang('existing_password_email')?></em><br />
			<?=form_label(lang('existing_password'), 'password')?>
			<?=form_password(array('id'=>'password','name'=>'password','class'=>'password','value'=>'','maxlength'=>40))?>
		</p>
		<?php endif;?>

		<fieldset><legend><?=lang('email_options')?></legend>
		<table style="width:100%">
			<tbody>
		<?php foreach($checkboxes as $checkbox):?>
			<tr><td>
			<?=form_checkbox(array('id'=>$checkbox,'name'=>$checkbox,'value'=>$checkbox, 'checked'=>($$checkbox=='y') ? TRUE : FALSE))?>
			</td><td>
			<strong><?=lang($checkbox)?></strong>
			</td></tr>
		<?php endforeach;?>
			</tbody>
		</table>
Example #22
0
                                <tr>
                                    <th>
                                        <label for='user'><?php 
    echo _('User') . required();
    ?>
</label>
                                    </th>
                                    <td class="left">
                                        <input type="text" class='vfield' name="user" id="user"/>
                                    </td>
                                </tr>

                                <tr>
                                    <th>
                                        <label for='pass'><?php 
    echo _('Password') . required();
    ?>
</label>
                                    </th>
                                    <td class="left">
                                        <input type="password" class='vfield' name="pass" id="pass" autocomplete="off"/>
                                    </td>
                                </tr>
                            </table>
                        </form>
                    </td>
                </tr>
            </table>

            <div id='c_actions'>
                <input type="button" id='send' value="<?php 
 /**
  * Edit Profile Form
  */
 function edit_profile()
 {
     $this->load->language('calendar');
     $vars['cp_page_title'] = lang('edit_profile');
     $vars = array_merge($this->_account_menu_setup(), $vars);
     $vars['screen_name'] = '';
     $vars['email'] = '';
     $vars['url'] = '';
     $vars['custom_profile_fields'] = array();
     // Fetch profile data
     $query = $this->member_model->get_member_data($this->id, array('url', 'location', 'occupation', 'interests', 'aol_im', 'yahoo_im', 'msn_im', 'icq', 'bio', 'bday_y', 'bday_m', 'bday_d'));
     foreach ($query->row_array() as $key => $val) {
         $vars[$key] = $val;
     }
     $vars['form_hidden']['id'] = $this->id;
     // Birthday Options
     $vars['bday_d_options'] = array();
     $vars['bday_y_options'][''] = lang('year');
     for ($i = date('Y', $this->localize->now); $i > 1904; $i--) {
         $vars['bday_y_options'][$i] = $i;
     }
     $vars['bday_m_options'] = array('' => lang('month'), '01' => lang('cal_january'), '02' => lang('cal_february'), '03' => lang('cal_march'), '04' => lang('cal_april'), '05' => lang('cal_mayl'), '06' => lang('cal_june'), '07' => lang('cal_july'), '08' => lang('cal_august'), '09' => lang('cal_september'), '10' => lang('cal_october'), '11' => lang('cal_november'), '12' => lang('cal_december'));
     $vars['bday_d_options'][''] = lang('day');
     for ($i = 1; $i <= 31; $i++) {
         $vars['bday_d_options'][$i] = $i;
     }
     if ($vars['url'] == '') {
         $vars['url'] = 'http://';
     }
     // Extended profile fields
     $query = $this->member_model->get_all_member_fields();
     if ($query->num_rows() > 0) {
         $this->load->helper('snippets');
         $result = $this->member_model->get_all_member_data($this->id);
         if ($result->num_rows() > 0) {
             foreach ($result->row_array() as $key => $val) {
                 ${$key} = $val;
             }
         }
         $resrow = $result->result_array();
         $resrow = $resrow[0];
         // @confirrm: end of a long, long, long stretch of work, but not sure why its returning into index 0...
         $vars['custom_profile_fields'] = array();
         foreach ($query->result_array() as $row) {
             $field_data = !isset($resrow['m_field_id_' . $row['m_field_id']]) ? '' : $resrow['m_field_id_' . $row['m_field_id']];
             $required = $row['m_field_required'] == 'n' ? '' : required() . NBS;
             if ($row['m_field_type'] == 'textarea') {
                 $rows = !isset($row['m_field_ta_rows']) ? '10' : $row['m_field_ta_rows'];
                 $vars['custom_profile_fields'][] = form_label($required . $row['m_field_label'], 'm_field_id_' . $row['m_field_id']) . form_textarea(array('name' => 'm_field_id_' . $row['m_field_id'], 'class' => 'field', 'id' => 'm_field_id_' . $row['m_field_id'], 'rows' => $rows, 'value' => $field_data));
             } elseif ($row['m_field_type'] == 'select') {
                 $dropdown_options = array();
                 foreach (explode("\n", trim($row['m_field_list_items'])) as $v) {
                     $v = trim($v);
                     $dropdown_options[$v] = $v;
                 }
                 $vars['custom_profile_fields'][] = form_label($required . $row['m_field_label'], 'm_field_id_' . $row['m_field_id']) . form_dropdown('m_field_id_' . $row['m_field_id'], $dropdown_options, $field_data, 'id="m_field_id_' . $row['m_field_id'] . '"');
             } elseif ($row['m_field_type'] == 'text') {
                 $vars['custom_profile_fields'][] = form_label($required . $row['m_field_label'], 'm_field_id_' . $row['m_field_id']) . form_input(array('name' => 'm_field_id_' . $row['m_field_id'], 'id' => 'm_field_id_' . $row['m_field_id'], 'class' => 'field', 'value' => $field_data, 'maxlength' => $row['m_field_maxl']));
             }
         }
     }
     $this->cp->render('account/edit_profile', $vars);
 }
<?php

extend_template('default');
?>

<?php 
echo form_open('C=admin_content' . AMP . 'M=channel_edit', array('id' => 'channel_prefs'), $form_hidden);
$this->table->set_template($cp_pad_table_template);
$this->table->template['thead_open'] = '<thead class="visualEscapism">';
// Create the Channel Base Setup
$this->table->set_caption(lang('channel_base_setup'));
$this->table->set_heading(lang('preference'), lang('setting'));
$preference = required() . lang('channel_title', 'channel_title') . form_error('channel_title');
$controls = form_input(array('id' => 'channel_title', 'name' => 'channel_title', 'class' => 'fullfield', 'value' => set_value('channel_title', $channel_title)));
$this->table->add_row($preference, array('style' => 'width:50%;', 'data' => $controls));
$preference = required() . lang('channel_name', 'channel_name') . form_error('channel_name');
$controls = form_input(array('id' => 'channel_name', 'name' => 'channel_name', 'class' => 'fullfield', 'value' => set_value('channel_name', $channel_name)));
$this->table->add_row($preference, array('style' => 'width:50%;', 'data' => $controls));
$preference = lang('channel_description', 'channel_description');
$controls = form_input(array('id' => 'channel_description', 'name' => 'channel_description', 'class' => 'fullfield', 'value' => $channel_description));
$this->table->add_row($preference, array('style' => 'width:50%;', 'data' => $controls));
$preference = lang('channel_lang', 'channel_lang');
$this->table->add_row($preference, array('style' => 'width:50%;', 'data' => form_dropdown('channel_lang', $languages, $channel_lang)));
echo $this->table->generate();
$this->table->clear();
// Clear out for the next one
// -------------------------------------------------------------
// Create the Paths table
$this->table->set_caption(lang('paths'));
$this->table->set_heading(lang('preference'), lang('setting'));
$preference = lang('channel_url', 'channel_url') . '<br />' . lang('channel_url_exp');
    ?>
" /></td>
            </tr>
            <tr>
              <th><strong>Last Name:</strong> <?php 
    echo required();
    ?>
</th>
              <td><input name="lname" type="text" class="inputbox" size="45" value="<?php 
    echo post('lname');
    ?>
" /></td>
            </tr>
            <tr>
              <th><strong>Are You Human? 5 + 4 =</strong> <?php 
    echo required();
    ?>
</th>
              <td><input name="captcha" type="text" class="inputbox" size="10" maxlength="2"/></td>
            </tr>
            <tr>
              <td><input class="button" name="submit" value="Register Account" type="submit" /></td>
              <td align="right"><a class="button-alt" href="index.php">Back to login</a></td>
            </tr>
          </table>
          <input name="doRegister" type="hidden" value="1" />
        </form>
      </div>
    </div>
<script type="text/javascript">
  // <![CDATA[
 /**
  * Fetch Stats
  *
  * @access	public
  * @return	string
  */
 function _fetch_stats()
 {
     // default array for our "Values" data cells.  We'll just set the 'data' for each row
     // and save ourselves a bit of repeated code applying the class
     $values = array('data' => '', 'class' => 'values');
     ee()->load->library('table');
     ee()->load->helper(array('url', 'snippets'));
     //		ee()->table->set_heading(lang('site_statistics'), array('data' => lang('value'), 'class' => 'values'));
     if (ee()->session->userdata['group_id'] == 1) {
         $values['data'] = ee()->config->item('is_system_on') == 'y' ? '<strong>' . lang('online') . '</strong>' : '<strong>' . lang('offline') . '</strong>';
         ee()->table->add_row(lang('system_status'), $values);
         if (ee()->config->item('multiple_sites_enabled') == 'y') {
             $values['data'] = ee()->config->item('is_site_on') == 'y' && ee()->config->item('is_system_on') == 'y' ? '<strong>' . lang('online') . '</strong>' : '<strong>' . lang('offline') . '</strong>';
             ee()->table->add_row(lang('site_status'), $values);
         }
         ee()->lang->loadfile('modules');
         $values['data'] = APP_VER;
         ee()->table->add_row(lang('module_version'), $values);
     }
     // total entries and comments
     ee()->db->where(array('site_id' => ee()->config->item('site_id')));
     $query = ee()->db->get('stats');
     $row = $query->row();
     $values['data'] = $row->total_entries;
     ee()->table->add_row(lang('total_entries'), $values);
     $values['data'] = $row->total_comments;
     ee()->table->add_row(lang('total_comments'), $values);
     // total template hits
     ee()->db->select_sum('templates.hits', 'total');
     ee()->db->from(array('templates'));
     $query = ee()->db->get();
     $row = $query->row();
     $values['data'] = $row->total;
     ee()->table->add_row(lang('total_hits'), $values);
     // member stats
     if (ee()->session->userdata('group_id') == 1) {
         // total members
         $values['data'] = ee()->db->count_all_results('members');
         ee()->table->add_row(lang('total_members'), $values);
         // total members waiting validation
         $values['data'] = 0;
         if (ee()->config->item('req_mbr_activation') == 'manual') {
             ee()->db->where('group_id', '4');
             $values['data'] = ee()->db->count_all_results('members');
         }
         ee()->load->helper(array('url', 'snippets'));
         $l = anchor(BASE . AMP . 'C=members&M=member_validation', required(lang('total_validating_members')));
         $link = $values['data'] > 0 ? $l : lang('total_validating_members');
         ee()->table->add_row($link, $values);
     }
     // total comments waiting validation
     if (ee()->cp->allowed_group('can_moderate_comments')) {
         ee()->load->model('addons_model');
         // is the comment module installed?
         if (ee()->addons_model->module_installed('comments')) {
             $values['data'] = 0;
             ee()->db->where(array('status' => 'p', 'site_id' => ee()->config->item('site_id')));
             $values['data'] = ee()->db->count_all_results('comments');
             $l = anchor(BASE . AMP . 'C=addons_modules' . AMP . 'M=show_module_cp' . AMP . 'module=comment' . AMP . 'method=index' . AMP . 'status=p', required(lang('total_validating_comments')));
             $link = $values['data'] > 0 ? $l : lang('total_validating_comments');
             ee()->table->add_row($link, $values);
         }
     }
     $tmpl = array('table_open' => '<table border="0" cellpadding="0" cellspacing="0">');
     ee()->table->set_template($tmpl);
     $ret = ee()->table->generate();
     ee()->table->clear();
     return $ret;
 }
    </div>
    <?php 
}
?>
    <?php 
if (!$sf_params->get('id')) {
    ?>
    <div class="row right_col">
        <?php 
    echo cryptographp_picture();
    echo cryptographp_reload();
    ?>
    </div>
    <div class="row">
        <?php 
    echo label_for('captcha', __('Type the code shown') . required());
    ?>
        <?php 
    echo input_tag('captcha', $sf_params->get('captcha'));
    ?>
        <?php 
    echo form_error('captcha');
    ?>
    </div>
    <?php 
}
?>
    <div class="row right_col">
        <?php 
echo submit_tag(__('Save'));
?>
    {
        global $email;
        global $nivelfilter;
        if (empty($email)) {
            return '<span class="required">Informe seu EMAIL.</span>';
        }
        if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
            return '<span class="required">Informe um EMAIL v&aacute;lido.</span>';
        }
        $query = mysql_query("SELECT email FROM usuarios WHERE email = '{$email}' {$nivelfilter} LIMIT 1");
        if (mysql_num_rows($query) < 1) {
            return '<span class="required">Este EMAIL não está cadastrado.</span>';
        }
        return false;
    }
    $required = required();
    if ($required) {
        $res['result'] = false;
        $res['message'] = $required;
    } else {
        $r = mysql_fetch_assoc($query = mysql_query("SELECT lembrete FROM usuarios WHERE email = '{$email}' {$nivelfilter} {$blockfilter} LIMIT 1"));
        $res['result'] = true;
        $res['message'] = '<span class="success">Lembrete de senha: <b>' . $r['lembrete'] . '</b></span>';
        if (isset($_SESSION["err_login"]) && $_SESSION["err_login"] > $limit_err - 5) {
            $_SESSION["err_login"] = $limit_err - 5;
        }
    }
    echo json_encode($res);
}
//-----------------------------------------------------------------------------------------------------------------------------------------------
//	ENVIAR SENHA POR EMAIL
/>
    					<label class="y_n" for="resend_alarms2"><?php 
echo _('No');
?>
</label>
    				</div>
    			</td>
    		</tr>
    		
    		<tr>
    			<th id="revents_text" style="padding-left:25px" <?php 
echo $class_resend;
?>
>
    				<span class="s_label" id="resend_events"><?php 
echo _('Forward events') . required();
?>
</span>
    			</th>
    			<td class="left">
    				<div class='cont_radio'>
    					<input type="radio" name="resend_events" class='vfield' id="resend_events1" value="1" <?php 
echo $chk_resend_events[1];
?>
 <?php 
echo $readonly;
?>
/>
    					<label class="y_n" for="resend_events1"><?php 
echo _('Yes');
?>
Example #30
0
 public function login()
 {
     $this->token = $_REQUEST['token'];
     $url = "https://rpxnow.com/api/v2/auth_info?apiKey=" . $this->jan_api . "&token=" . $this->token . "&extended=false&tokenURL=http://localhost:80";
     $infos_user = json_decode('[' . file_get_contents($url) . ']', true);
     if ($infos_user) {
         $u = $infos_user[0];
         $data_user = $u['profile'];
         $_SESSION['email'] = @$u['profile']['email'] ? $u['profile']['email'] : $u['profile']['url'];
         $this->userAuthData();
         if (!$this->auth) {
             $conn = new Mongo('localhost');
             $db = $conn->users;
             $collection = $db->items;
             required('models', 'schemas');
             $user_schema = Schemas::user();
             $collection->insert(array_merge_recursive($user_schema, $data_user));
             $this->auth = $collection->findOne(array('email' => $_SESSION['email']));
             $conn->close();
         }
         return true;
     }
     return false;
 }