本文整理汇总了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';
示例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);