コード例 #1
0
ファイル: user_details.php プロジェクト: dpk-gh/cgTest
<?php 
    exit;
}
$return_success = "false";
$return_error = "1";
$return_warning = "";
$return_message = $ERROR_MESSAGE[$return_error];
$return_session = session_id();
$return_value = "";
/* Common Declaration - End */
if (user_detail('user_id')) {
    // Getting selected details as per the conditions applied
    $sql_query = "SELECT md5(user_id) AS " . $FIELDS_USED[0];
    $sql_query .= ", name AS " . $FIELDS_USED[1];
    $sql_query .= ", email AS " . $FIELDS_USED[2];
    $sql_query .= " FROM " . table_user . " WHERE user_id=" . user_detail('user_id') . " AND status=1";
    $result_list_user = $obj->select_from_table($sql_query);
    if (isset($_REQUEST['list'])) {
        echo "<pre>";
        echo "\t/* ==========================================< User Detail - Start >==============================================================";
        if (count($result_list_user) > 0) {
            $value_user = $result_list_user[0];
            echo '<br/><br/>	        ';
            echo "<div style=\"width:50px; display:inline-block; vertical-align:top;\">";
            echo "</div>";
            echo "<div style=\"width:300px; display:inline-block; margin-left:10px; vertical-align:top;\">";
            echo "<strong style=\"color:#98263F;\">" . $value_user[$FIELDS_USED[1]] . " (" . $value_user[$FIELDS_USED[0]] . ")" . "</strong>";
            echo "<br/><strong>Name</strong>\t\t: " . $value_user[$FIELDS_USED[1]];
            echo "<br/><strong>Email Id</strong>\t: " . $value_user[$FIELDS_USED[2]];
            echo "</div>";
        }
コード例 #2
0
        if ($balance === false) {
            $errors[] = 'Vehicle Number' . $vehicle_number . 'balance is low. Bill Manually!!!';
            $data1 = array();
            $data1 = mysql_fetch_assoc(mysql_query("SELECT * FROM `vehicle` WHERE `vehicle_number` = '{$vehicle_number}'"));
            $vehicle_owner_id = $data1['vehicle_owner_id'];
            $data2 = array();
            $data2 = mysql_fetch_assoc(mysql_query("SELECT * FROM `user` WHERE `user_id` = '{$vehicle_owner_id}'"));
            $email = $data2['email'];
            $body = "Your Current Balance is " . $data2['balance'] . " which is low. Recharge Urgently.";
            $sub = "Toll Booth Transaction";
            $bool = sendMail($email, $body, $sub);
        } else {
            $errors[] = 'Vehicle Number ' . $vehicle_number . ' billed successfully!';
            $data1 = array();
            tb_owner_detail($vehicle_number, $user_data);
            $data1 = user_detail($vehicle_number, $user_data);
            $time = $data1['time'];
            $date = $data1['date'];
            $data2 = array();
            $data2 = mysql_fetch_assoc(mysql_query("SELECT * FROM `user_detail` WHERE `date` = '{$date}' AND `time` = '{$time}'"));
            $email = $data2['email'];
            $body = "Amount of Rs. " . $data2['cost'] . " deducted on " . $data2['date'] . " at " . $data2['time'] . " . Remaining Balance is " . $data2['updated_balance'] . ". Toll Booth Detail:" . " 1)Toll-Booth I.D : " . $data2['tb'] . " 2)National Highway : " . $data2['tb_nh'] . " 3)Pincode : " . $data2['tb_pincode'];
            $sub = "Toll Booth Transaction";
            $bool = sendMail($email, $body, $sub);
        }
    }
}
if (empty($errors) === false) {
    //echo output_errors($errors);
    $error_all = output_errors($errors);
    echo "<script type='text/javascript'>alert('{$error_all}');</script>";
コード例 #3
0
        } else {
            foreach ($user as $value) {
                echo "<a href=\"?action=user&amp;user=detailuser&amp;detailuser={$value}\">{$value}</A> \n";
            }
        }
        echo "</TD></TR></TABLE>\n";
        mysql_close();
        break;
        // ----------------------------------------------------------
    // ----------------------------------------------------------
    case detailuser:
        include 'config.inc.php';
        include 'function.php';
        mysql_connect($sql_server, $sql_user, $sql_pw) or die("DB-Fehler-Nummer" . mysql_errno() . "|| Meldung: " . mysql_error());
        mysql_select_db($sql_db) or die("DB-Fehler-Nummer" . mysql_errno() . "|| Meldung: " . mysql_error());
        $info = user_detail($_GET['detailuser']);
        $info[4] = number_format(round($info[4], 2) / 1024 / 1024, 2, ".", ",");
        $info[5] = number_format(round($info[5], 2) / 1024 / 1024, 2, ".", ",");
        $newstatus = "";
        $text = "";
        if ($info[2] == "1") {
            $newstatus = "0";
            $text = "Account Sperren";
        } else {
            $newstatus = "1";
            $text = "Account Freischalten";
        }
        ?>
	<TABLE id="text">
	<TR>
	<TD>Name:</TD><TD><?php