示例#1
0
    $insResult = sql_query($insQuery, $db);
    $query = "SELECT * FROM configure";
    $result = sql_query($query, $db);
    $row = sql_fetch_array($result);
    foreach ($array as $key => $value) {
        $num = $value[3];
        if ($value[1] == "text") {
            echo "<tr><td>&nbsp;</td><td align=right><font face=arial>{$value['0']}:</font></td>\r\n\t\t\t<td><input type={$value['1']} value='" . $row[$num] . "' size={$value['2']} name={$value['3']}></td></tr>";
        } elseif ($row[$num] == 1) {
            echo "<tr><td>&nbsp;</td><td align=right><font face=arial>{$value['0']}:</font></td>\r\n\t\t\t<td><input type={$value['1']} value=1 checked={$value['2']} name={$value['3']}></td></tr>";
        } else {
            echo "<tr><td>&nbsp;</td><td align=right><font face=arial>{$value['0']}:</font></td>\r\n\t\t\t<td><input type={$value['1']} value=1 name={$value['3']}></td></tr>";
        }
    }
} else {
    $db = pDataconnect();
    sql_select_db("opData", $db);
    $query = "SELECT * FROM configure";
    $result = sql_query($query, $db);
    $row = sql_fetch_array($result);
    $numRow = sql_num_rows($result);
    if ($numRow != 0) {
        foreach ($array as $key => $value) {
            $num = $value[3];
            if ($value[1] == "text") {
                echo "<tr><td>&nbsp;</td><td align=right><font face=arial>{$value['0']}:</font></td>\r\n\t\t\t<td><input type={$value['1']} value='" . $row[$num] . "' size={$value['2']} name={$value['3']}></td></tr>";
            } elseif ($row[$num] == 1) {
                echo "<tr><td>&nbsp;</td><td align=right><font face=arial>{$value['0']}:</font></td>\r\n\t\t\t<td><input type={$value['1']} value=1 checked={$value['2']} name={$value['3']}></td></tr>";
            } else {
                echo "<tr><td>&nbsp;</td><td align=right><font face=arial>{$value['0']}:</font></td>\r\n\t\t\t<td><input type={$value['1']} value=1 name={$value['3']}></td></tr>";
            }
示例#2
0
function ccout($User1, $Result, $TroutD, $ccamt, $catTroutD)
{
    $ccIDQ = "SELECT top 1 trans_id FROM INX order by transdate desc";
    $dbCC = pDataconnect();
    $ccIDR = mssql_query($ccIDQ, $dbCC);
    $ccIDW = mssql_fetch_row($ccIDR);
    $lane = $_SESSION["laneno"];
    $trans = $_SESSION["transno"];
    //$trans_id = $_SESSION["LastID"];
    $trans_id = $ccIDW[0];
    $pccharge = $_SESSION["ccServer"];
    $cn = mysql_connect($pccharge, 'sa');
    mysql_select_db('is4cc', $cn);
    $insCCOutQ = "INSERT INTO CC_OUT(user_id,result,troutd,amount,four,register_no,trans_no,trans_id)\r\n\t\t\t\t  VALUES('{$User1}', '{$Result}','{$TroutD}',{$ccamt},{$catTroutD},{$lane},{$trans},{$trans_id})";
    //echo $insCCOutQ;
    $insCCOutR = mysql_query($insCCOutQ, $cn);
}