本文整理汇总了PHP中DB_Functions::openCloseChartUser方法的典型用法代码示例。如果您正苦于以下问题:PHP DB_Functions::openCloseChartUser方法的具体用法?PHP DB_Functions::openCloseChartUser怎么用?PHP DB_Functions::openCloseChartUser使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DB_Functions
的用法示例。
在下文中一共展示了DB_Functions::openCloseChartUser方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
<?php
include_once 'db_functions.php';
include 'session.php';
$db = new DB_Functions();
$currentUser = $db->getSingleUserByEmail($login_session);
$currentUserRow = mysql_fetch_array($currentUser);
if ("admin" === strtolower($login_name) || "1" === $currentUserRow["Admin"] || "1" === $currentUserRow["Auditor"]) {
$query1 = $db->openCloseChart();
} else {
$query1 = $db->openCloseChartUser($login_name);
}
$close = 0;
$open = 0;
$count = 0;
$var = array();
$data = array();
if ($query1) {
while ($obj = mysql_fetch_object($query1)) {
$var[$count] = $obj;
if ("admin" === strtolower($login_name) || "1" === $currentUserRow["Admin"] || "1" === $currentUserRow["Auditor"]) {
$q2 = "select Status from report where ReportName = '" . $var[$count]->ReportName . "'";
} else {
$q2 = "select Status from report where ReportName = '" . $var[$count]->ReportName . "' AND (ResponsiblePerson = '" . $login_name . "' OR ResponsiblePerson2 = '" . $login_name . "' OR ResponsiblePerson3 = '" . $login_name . "' OR ResponsiblePerson4 = '" . $login_name . "' OR ResponsiblePerson5 = '" . $login_name . "') ";
}
if ($query2 = $db->openCloseChartq2($q2)) {
while ($obj1 = mysql_fetch_object($query2)) {
if ($obj1->Status == 'Close') {
$close++;
}
if ($obj1->Status == 'Open' || $obj1->Status == 'open') {
示例2: array
//var_dump($emailadress);
//$xyz = array('aname' => $emailadress[0]["email"] );
//echo json_encode($xyz);
// $data1 = array();
// $data1[0] = array('name'=>'Raja Ali Ehsan', 'email' => 'mtalhajamil93@gmail.com');
// $data1[1] = array('name'=>'Muhammad Shoaib Hasan', 'email' => 'mtalhajamil93@gmail.com');
//echo count($data1);
// $count = count($emailadress);
//echo $data[0]["name"];
//var_dump($data);
// for ($i=0;$i<$count;$i++)
// {
//echo $i;
//$respname= $emailadress[$i]['username'];
//echo $respname;
$query1 = $db->openCloseChartUser($respname);
$close = 0;
$open = 0;
$count = 0;
$var = array();
$data = array();
if ($query1) {
while ($obj = mysql_fetch_object($query1)) {
$var[$count] = $obj;
$q2 = "select Status from report where ReportName = '" . $var[$count]->ReportName . "' AND (ResponsiblePerson = '" . $respname . "' OR ResponsiblePerson2 = '" . $respname . "' OR ResponsiblePerson3 = '" . $respname . "' OR ResponsiblePerson4 = '" . $respname . "' OR ResponsiblePerson5 = '" . $respname . "') ";
if ($query2 = $db->openCloseChartq2($q2)) {
while ($obj1 = mysql_fetch_object($query2)) {
if ($obj1->Status == 'Close') {
$close++;
}
if ($obj1->Status == 'Open' || $obj1->Status == 'open') {