當前位置: 首頁>>代碼示例>>PHP>>正文


PHP DB_Functions::openCloseChartq2方法代碼示例

本文整理匯總了PHP中DB_Functions::openCloseChartq2方法的典型用法代碼示例。如果您正苦於以下問題:PHP DB_Functions::openCloseChartq2方法的具體用法?PHP DB_Functions::openCloseChartq2怎麽用?PHP DB_Functions::openCloseChartq2使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在DB_Functions的用法示例。


在下文中一共展示了DB_Functions::openCloseChartq2方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: count

$allDataInSheet = $objPHPExcel->getActiveSheet()->toArray(null, true, true, true);
$arrayCount = count($allDataInSheet);
// Here get total count of row in that Excel sheet
for ($i = 2; $i <= $arrayCount; $i++) {
    $obsref = trim($allDataInSheet[$i]["A"]);
    $reportname = trim($allDataInSheet[$i]["B"]);
    $replaced = preg_replace('/[^\\x00-\\x7F]+/', '', $reportname);
    //echo $replaced;
    $process = trim($allDataInSheet[$i]["C"]);
    $process = preg_replace('/[^\\x00-\\x7F]+/', '', $process);
    $subprocess = trim($allDataInSheet[$i]["D"]);
    $issuerating = trim($allDataInSheet[$i]["E"]);
    $observation = trim($allDataInSheet[$i]["F"]);
    //echo " ".$i." \n";
    $risk = trim($allDataInSheet[$i]["G"]);
    $recommendation = trim($allDataInSheet[$i]["H"]);
    $managecomment = trim($allDataInSheet[$i]["I"]);
    $responsibleperson = trim($allDataInSheet[$i]["J"]);
    $agreeddate = trim($allDataInSheet[$i]["K"]);
    //echo " ".$i." \n";
    $closuredate = trim($allDataInSheet[$i]["M"]);
    //echo " closure date is ".$closuredate." \n";
    $status = trim($allDataInSheet[$i]["L"]);
    //	echo " ".$i." \n";
    $comments = trim($allDataInSheet[$i]["N"]);
    $sqlQuery = "insert into report(ObsRef,ReportName,Process,SubProcess,IssueRating,Observation,Risk,Recommendation,ManagComment,ResponsiblePerson,AgreedDate,ClosureDate,Status,Comments,Severity,Permission) values('" . $obsref . "','" . $replaced . "','" . $process . "','" . $subprocess . "','" . $issuerating . "','" . $observation . "','" . $risk . "','" . $recommendation . "','" . $managecomment . "','" . $responsibleperson . "','" . $agreeddate . "','" . $closuredate . "','" . $status . "','" . $comments . "','High','RO')";
    $insert = $db->openCloseChartq2($sqlQuery);
    $msg = 'Record has been added. <div style="Padding:20px 0 0 0;"></div>';
}
echo "<div style='font: bold 18px arial,verdana;padding: 45px 0 0 500px;'>" . $msg . "</div>";
include '../session.php';
開發者ID:ameerhamza26,項目名稱:audit,代碼行數:31,代碼來源:import.php

示例2: array

    $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') {
                    $open++;
                }
            }
        }
        $data[$count] = array('name' => $obj->ReportName, 'closed' => $close, 'opened' => $open);
        $count++;
        $close = 0;
        $open = 0;
    }
    echo json_encode($data);
開發者ID:ameerhamza26,項目名稱:audit,代碼行數:31,代碼來源:chart1.php


注:本文中的DB_Functions::openCloseChartq2方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。