当前位置: 首页>>代码示例>>PHP>>正文


PHP DB_Functions::openCloseChartUser方法代码示例

本文整理汇总了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') {
开发者ID:ameerhamza26,项目名称:audit,代码行数:31,代码来源:chart1.php

示例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') {
开发者ID:ameerhamza26,项目名称:audit,代码行数:31,代码来源:email4.php


注:本文中的DB_Functions::openCloseChartUser方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。