示例#1
0
function getAccount($idAccount)
{
    //Realiza el query en la base de datos
    $mysqli = makeSqlConnection();
    $sql = "SELECT * FROM accounts a, accounts_cstm ac WHERE a.id = ac.id_c AND a.id = '{$idAccount}'";
    $res = $mysqli->query($sql);
    $rows = array();
    while ($r = mysqli_fetch_assoc($res)) {
        $obj = (object) $r;
        $idUsuario = $obj->assigned_user_id;
        $sql2 = "SELECT user_name FROM users WHERE id = '{$idUsuario}'";
        $res2 = $mysqli->query($sql2);
        while ($r2 = mysqli_fetch_assoc($res2)) {
            $obj->assigned_user_name = $r2['user_name'];
        }
        $obj->email_address = getAccountEmail($idAccount);
        //$obj->hash = crypt(md5("C4l4mb31"));
        $a = (array) $obj;
        $rows[] = $a;
    }
    if (empty($rows)) {
        return '{"results" :[]}';
    } else {
        //Convierte el arreglo en json y lo retorna
        $temp = json_encode(utf8ize($rows));
        return '{"results" :' . $temp . '}';
    }
}
			<div class="box-head">
			<h2 class="left">Your Personal Details	</h2>
			</div>
			<!-- End Box Head -->
			<!-- Table -->
			<div class="table">
			
			<?php 
echo "<p style='margin-left:20px;margin-top:5px;\t padding:3px; color: rgb(216,71,71); line-height:20px; font-size:12px;'>{$msg} </p>";
echo "<p style='margin-left:20px;margin-top:5px; padding:3px; color:#74a446; line-height:20px; font-size:12px;'>{$success} </p>";
?>
			<?php 
$username = $_SESSION['user'];
$user_id = getAccountid($username);
$profile = getProfile($user_id);
$email = getAccountEmail($username);
?>
			<?php 
if (!$profile[0]['locked']) {
    echo "\n\t\t\t<form  role='form' action='' method='post'>\n\t\t\t\t<label style='color:#ffa800'>You are allowed to edit this information only once.</label>\n\t\t\t\t<label>Username:</label>\n\t\t\t\t<input type='text' name='username' value='{$username}' readonly/>\n\t\t\t\t<label>Email:</label> \n\t\t\t\t<input type='text' readonly  name='email' value='{$email}'/>\n \n\t\t\t\t<label>Full Name:</label>\n\t\t\t\t<input type='text' name='name' value='{$name}'/>\n\n\t\t\t\t<label>Institute:</label>\n\t\t\t\t<select name='institute' >\n\t\t\t\t\t<option value='0'>Select your institute </option>";
    $coll = getColleges();
    for ($i = 0; $i < count($coll); $i++) {
        $name = $coll[$i]['name'];
        $id = $coll[$i]['id'];
        echo "<option value='{$id}' ";
        if ($inst == $id) {
            echo "selected";
        }
        echo ">{$name}</option>";
    }
    echo "\n\t\t\t\t</select>\n\t\t\t\t<label>Profession:</label>\n\t\t\t\t<input type='text' name='prof' value = '{$prof}' />\n  \n\t\t\t\t<label>Gender:</label>\n\t\t\t\t<input type='radio' name='gender' value='male'";
示例#3
0
        }
        $vendor = array($id, $vendorName, $first, $second, $third, $fourth, $remit);
        $inventory['categories'][$category][$id] = $vendor;
        $inventory['vendors'][$id] = $vendor;
        $id += 1;
    }
}
function getCurrentDateTime()
{
    date_default_timezone_set('America/Los_Angeles');
    //pacific time
    //year/mm/dd hh:mm
    $datetime = date("M") . '/' . date("d") . '/' . date("Y") . ' ' . date("H") . ':' . date("i");
    return $datetime;
}
getAccountEmail();
if ($VisibleCtl) {
    $tempplateInfo = getTemplateInfo();
    $Special_Messages = $tempplateInfo[0];
    $PickupOptions = $tempplateInfo[1];
    $Order_Deadline = $tempplateInfo[2];
    $deadline_date = strtotime($Order_Deadline);
    $Order_Deadline_Display = date("M/d/Y", $deadline_date);
    $today = time();
    $deadline_str = date("Y-m-d", $deadline_date);
    $today_str = date("Y-m-d", $today);
    if ($today_str <= $deadline_str) {
        $System_Enabled = true;
        getInventoryInfo();
    } else {
        $System_Enabled = false;