Exemple #1
0
function mainAutoLoader($class)
{
    // Exceptions werden leicht besonders behandelt.
    if (right($class, 9) === 'Exception') {
        $file = DIAMONDMVC_ROOT . "/exceptions/{$class}.php";
    } else {
        $class = strToLower($class);
        if (left($class, 10) === 'controller' and $class !== 'controller') {
            $class = substr($class, 10);
            $file = DIAMONDMVC_ROOT . "/controllers/{$class}.php";
        } else {
            if (left($class, 5) === 'model' and $class !== 'model') {
                $class = substr($class, 5);
                $file = DIAMONDMVC_ROOT . "/models/{$class}.php";
            } else {
                if (left($class, 6) === 'module' and $class !== 'module') {
                    $class = substr($class, 6);
                    $file = DIAMONDMVC_ROOT . "/modules/{$class}/{$class}.php";
                } else {
                    $file = DIAMONDMVC_ROOT . "/lib/class_{$class}.php";
                }
            }
        }
    }
    if (file_exists($file)) {
        include_once $file;
    }
}
Exemple #2
0
function autoloadFields($class)
{
    if (strToLower(left($class, 5)) !== 'field') {
        return;
    }
    require_once jailpath(DIAMONDMVC_ROOT . '/classes/fields', strToLower(substr($class, 5)) . '.php');
}
function extractColors($Hexa)
{
    if (strlen($Hexa) != 6) {
        return array(0, 0, 0);
    }
    $R = hexdec(left($Hexa, 2));
    $G = hexdec(mid($Hexa, 3, 2));
    $B = hexdec(right($Hexa, 2));
    return array($R, $G, $B);
}
Exemple #4
0
 protected function generateDataString($exclude = array())
 {
     $result = '';
     foreach ($this->data as $key => $value) {
         if (left($key, 7) === 'search-' and !in_array($key, $exclude)) {
             $result .= ' data-' . $key . '="' . $value . '"';
         }
     }
     return $result;
 }
Exemple #5
0
function textFormat($arrayData, $maxchar)
{
    $maxchar = 40;
    $text = '';
    foreach ($arrayData as $key => $val) {
        $newval = number_format($val, 0, '', '.');
        $space = $maxchar - (strlen($key) + strlen($newval) + 2);
        $text .= left($key, strlen($key));
        $text .= str_repeat(" ", $space);
        $text .= right($newval, strlen($newval));
        $text .= ",-";
        $text .= "\r\n";
    }
    return $text;
}
Exemple #6
0
function getWhereAnd($sql, $addSql)
{
    $LCaseAddSql = '';
    $AddType = '';
    $s = '';
    //追加SQl为空则退出
    if (aspTrim($addSql) == '') {
        $getWhereAnd = $sql;
        return @$getWhereAnd;
    }
    if (inStr(lCase($sql), ' where ') > 0) {
        $AddType = ' And ';
    } else {
        $AddType = ' Where ';
    }
    if ($addSql != '') {
        $addSql = aspTrim($addSql);
        $LCaseAddSql = lCase($addSql);
        if (left($LCaseAddSql, 6) == 'order ' || left($LCaseAddSql, 6) == 'group ') {
            $getWhereAnd = $sql . ' ' . $addSql;
            return @$getWhereAnd;
            //改进必需加空格,因为前面已经删除了20160115
        } else {
            if (left($LCaseAddSql, 6) == 'where ') {
                $addSql = mid($addSql, 7, -1);
            } else {
                if (left($LCaseAddSql, 4) == 'and ') {
                    $addSql = mid($addSql, 5, -1);
                }
            }
        }
        //对where 改进   20160623
        $s = lCase($addSql);
        if ($s != 'and' && $s != 'or' && $s != 'where') {
            $sql = $sql . $AddType . $addSql;
        }
    }
    $getWhereAnd = $sql;
    return @$getWhereAnd;
}
$showDateTo1 = $dp->show('dateto1');
$showDateFrom2 = $dp->show('datefrom2');
$showDateTo2 = $dp->show('dateto2');
error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE);
//$log = new Log();
$s = new XoopsSecurity();
//$ctrl= new SelectCtrl();
$periodfromctrl = $simbizctrl->getSelectPeriod(0, 'N', "onchange=updatePeriodTo(reporttype.value)", "periodfrom_id");
$periodtoctrl = $simbizctrl->getSelectPeriod(0, 'N', "", "periodto_id");
//$yearfromctrl=$simbizctrl->getSelectFinancialYear(0,'N',"","financialyearfrom_id");
//$yeartoctrl=$simbizctrl->getSelectFinancialYear(0,'N',"","financialyearto_id");
if ($defaultDateSession == "") {
    $defaultDateSession = date("Y-m-d", time());
}
$datefrom1 = left($defaultDateSession, 7) . "-01";
$dateto1 = getLastDayByMonth(left($defaultDateSession, 7));
$uid = $xoopsUser->getVar('uid');
$orgctrl = $ctrl->selectionOrg($uid, $defaultorganization_id, 'N', "", 'N');
echo <<<EOF
<script type='text/javascript'>
function validateForm(){

    var datefrom1 = document.forms['frmincomestatementreport'].datefrom1.value;
    var datefrom2= document.forms['frmincomestatementreport'].datefrom2.value;
    var dateto1= document.forms['frmincomestatementreport'].dateto2.value;
    var dateto2= document.forms['frmincomestatementreport'].dateto2.value;
    var periodfrom_id= document.forms['frmincomestatementreport'].periodfrom_id.value;
    var periodto_id= document.forms['frmincomestatementreport'].periodto_id.value;

    var reporttype = document.forms['frmincomestatementreport'].reporttype.value;
Exemple #8
0
function replaceDim($content)
{
    $splStr = '';
    $s = '';
    $tempS = '';
    $c = '';
    $lCaseS = '';
    $DimInTHNumb = '';
    $splStr = aspSplit($content, ',');
    foreach ($splStr as $key => $s) {
        $s = aspTrim($s);
        $lCaseS = lCase($s);
        if ($s != '') {
            //对变量中()处理,
            if (inStr($s, '(') > 0) {
                $s = mid($s, 1, inStr($s, '(') - 1);
            }
            $DimInTHNumb = inStr(lCase($GLOBALS['ReplaceDimList']), ',' . $lCaseS . '=');
            //替换变量
            if ($DimInTHNumb > 0) {
                //替换变量
                $tempS = mid($GLOBALS['ReplaceDimList'], $DimInTHNumb + 1, -1);
                $tempS = mid($tempS, 1, inStr($tempS, ',') - 1);
                $tempS = mid($tempS, inStr($tempS, '=') + 1, -1);
                if (inStr($GLOBALS['FunDim'] . $GLOBALS['RootFunDim'], ',' . $tempS . ',') == false) {
                    $s = $tempS;
                }
            }
            $c = $c . $s . ',';
        }
    }
    if ($c != '') {
        $c = left($c, len($c) - 1);
    }
    $replaceDim = $c;
    return @$replaceDim;
}
}
include_once dirname(__FILE__) . "/ressources/class.templates.inc";
include_once dirname(__FILE__) . "/ressources/class.users.menus.inc";
include_once dirname(__FILE__) . "/ressources/class.miniadm.inc";
include_once dirname(__FILE__) . "/ressources/class.mysql.postfix.builder.inc";
include_once dirname(__FILE__) . "/ressources/class.squid.inc";
if (isset($_GET["content"])) {
    content();
    exit;
}
if (isset($_GET["messaging-right"])) {
    messaging_right();
    exit;
}
if (isset($_GET["left"])) {
    left();
    exit;
}
if (isset($_GET["proxy-settings"])) {
    section_architecture_tabs();
    exit;
}
if (isset($_GET["web-filtering"])) {
    web_filtering();
    exit;
}
if (isset($_GET["tasks"])) {
    tasks();
    exit;
}
if (isset($_GET["monitor"])) {
Exemple #10
0
function getHtmlValue($content, $sType)
{
    $i = '';
    $endStr = '';
    $s = '';
    $labelName = '';
    $startLabel = '';
    $endLabel = '';
    $LCaseEndStr = '';
    $paramName = '';
    $startLabel = '<';
    $endLabel = '>';
    for ($i = 1; $i <= len($content); $i++) {
        $s = mid($content, $i, 1);
        $endStr = mid($content, $i, -1);
        if ($s == '<') {
            if (inStr($endStr, '>') > 0) {
                $s = mid($endStr, 1, inStr($endStr, '>'));
                $i = $i + len($s) - 1;
                $s = mid($s, 2, len($s) - 2);
                $s = PHPTrim($s);
                if (right($s, 1) == '/') {
                    $s = PHPTrim(left($s, len($s) - 1));
                }
                $endStr = right($endStr, len($endStr) - len($s) - 2);
                //最后字符减去当前标签  -2是因为它有<>二个字符
                //注意之前放在labelName下面
                $labelName = mid($s, 1, inStr($s . ' ', ' ') - 1);
                $labelName = lCase($labelName);
                if ($labelName == 'title' && $sType == 'webtitle') {
                    $LCaseEndStr = lCase($endStr);
                    if (inStr($LCaseEndStr, '</title>') > 0) {
                        $s = mid($endStr, 1, inStr($LCaseEndStr, '</title>') - 1);
                    } else {
                        $s = '';
                    }
                    $getHtmlValue = $s;
                    return @$getHtmlValue;
                } else {
                    if ($labelName == 'meta' && ($sType == 'webkeywords' || $sType == 'webdescription')) {
                        $LCaseEndStr = lCase($endStr);
                        $paramName = PHPTrim(lCase(getParamValue($s, 'name')));
                        if ('web' . $paramName == $sType) {
                            $getHtmlValue = getParamValue($s, 'content');
                            return @$getHtmlValue;
                        }
                    }
                }
            }
        }
    }
    $getHtmlValue = '';
    return @$getHtmlValue;
}
function formatting($content, $action)
{
    $i = '';
    $endStr = '';
    $s = '';
    $c = '';
    $labelName = '';
    $startLabel = '';
    $endLabel = '';
    $endLabelStr = '';
    $nLevel = '';
    $isYes = '';
    $parentLableName = '';
    $nextLableName = '';
    //下一个标题名称
    $isA = '';
    //是否为A链接
    $isTextarea = '';
    //是否为多行输入文本框
    $isScript = '';
    //脚本语言
    $isStyle = '';
    //Css层叠样式表
    $isPre = '';
    //是否为pre
    $startLabel = '<';
    $endLabel = '>';
    $nLevel = 0;
    $action = '|' . $action . '|';
    //层级
    $isA = false;
    $isTextarea = false;
    $isScript = false;
    $isStyle = false;
    $isPre = false;
    $content = replace(replace($content, vbCrlf(), chr(10)), vbTab(), '    ');
    for ($i = 1; $i <= len($content); $i++) {
        $s = mid($content, $i, 1);
        $endStr = mid($content, $i, -1);
        if ($s == '<') {
            if (inStr($endStr, '>') > 0) {
                $s = mid($endStr, 1, inStr($endStr, '>'));
                $i = $i + len($s) - 1;
                $s = mid($s, 2, len($s) - 2);
                if (right($s, 1) == '/') {
                    $s = PHPTrim(left($s, len($s) - 1));
                }
                $endStr = right($endStr, len($endStr) - len($s) - 2);
                //最后字符减去当前标签  -2是因为它有<>二个字符
                //注意之前放在labelName下面
                $labelName = mid($s, 1, inStr($s . ' ', ' ') - 1);
                $labelName = lCase($labelName);
                //call echo("labelName",labelName)
                if ($labelName == 'a') {
                    $isA = true;
                } else {
                    if ($labelName == '/a') {
                        $isA = false;
                    } else {
                        if ($labelName == 'textarea') {
                            $isTextarea = true;
                        } else {
                            if ($labelName == '/textarea') {
                                $isTextarea = false;
                            } else {
                                if ($labelName == 'script') {
                                    $isScript = true;
                                } else {
                                    if ($labelName == '/script') {
                                        $isScript = false;
                                    } else {
                                        if ($labelName == 'style') {
                                            $isStyle = true;
                                        } else {
                                            if ($labelName == '/style') {
                                                $isStyle = false;
                                            } else {
                                                if ($labelName == 'pre') {
                                                    $isPre = true;
                                                } else {
                                                    if ($labelName == '/pre') {
                                                        $isPre = false;
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
                $endLabelStr = $endLabel;
                $nextLableName = getHtmlLableName($endStr, 0);
                //不为压缩HTML
                if (inStr($action, '|ziphtml|') == false && $isPre == false) {
                    if ($isA == false) {
                        if (inStr('|a|strong|u|i|s|script|', '|' . $labelName . '|') == false && '/' . $labelName != $nextLableName && inStr('|/a|/strong|/u|/i|/s|/script|', '|' . $nextLableName . '|') == false) {
                            $endLabelStr = $endLabelStr . chr(10);
                        }
                    }
                }
                //单标签最后加个 /   20160615
                if (inStr('|br|hr|img|input|param|meta|link|', '|' . $labelName . '|') > 0) {
                    $s = $s . ' /';
                }
                $s = $startLabel . $s . $endLabelStr;
                //不为压缩HTML
                if (inStr($action, '|ziphtml|') == false && $isPre == false) {
                    //处理这个            aaaaa</span>
                    if ($isA == false && $isYes == false && left($labelName, 1) == '/' && $labelName != '/script' && $labelName != '/a') {
                        //排除这种    <span>天天发团</span>     并且判断上一个字段不等于vbcrlf换行
                        if ('/' . $parentLableName != $labelName && right(aspTrim($c), 1) != chr(10)) {
                            $s = chr(10) . $s;
                        }
                    }
                }
                $parentLableName = $labelName;
                $isYes = true;
            }
        } else {
            if ($s != '') {
                $isYes = false;
                //call echo("isPre",isPre)
                if ($isPre == false) {
                    if ($s == chr(10)) {
                        if ($isTextarea == false && $isScript == false && $isStyle == false) {
                            $s = '';
                        } else {
                            if ($isScript == true) {
                                if (inStr($action, '|zipscripthtml|') > 0) {
                                    $s = ' ';
                                }
                            } else {
                                if ($isStyle == true) {
                                    if (inStr($action, '|zipstylehtml|') > 0) {
                                        $s = '';
                                    }
                                } else {
                                    if ($isTextarea == true) {
                                        if (inStr($action, '|ziptextareahtml|') > 0) {
                                            $s = '';
                                        }
                                    } else {
                                        $s = chr(10);
                                    }
                                }
                            }
                        }
                        // Right(Trim(c), 1) = ">")   为在压缩时用到
                    } else {
                        if ((right(aspTrim($c), 1) == chr(10) || right(aspTrim($c), 1) == '>') && PHPTrim($s) == '' && $isTextarea == false && $isScript == false) {
                            $s = '';
                        }
                    }
                }
            }
        }
        $c = $c . $s;
    }
    $c = replace($c, chr(10), vbCrlf());
    $formatting = $c;
    return @$formatting;
}
function Find_Specific_Report_Paragraph($phrase_to_look_for, $file, $pl1_name, $aspect, $pl2_name, $pl_pos, $pl_speed)
{
    $string = "";
    $len = strlen($phrase_to_look_for);
    //put entire file contents into an array, line by line
    $file_array = file($file);
    // look through each line searching for $phrase_to_look_for
    for ($i = 0; $i < count($file_array); $i++) {
        if (left(trim($file_array[$i]), $len) == $phrase_to_look_for) {
            $flag = 0;
            while (trim($file_array[$i]) != "*") {
                if ($flag == 0) {
                    if ($pl_speed < 0) {
                        //retrograde
                        $string .= "<b>" . $pl1_name . $aspect . $pl2_name . "</b> - " . $pl1_name . " (Rx) at " . Convert_Longitude($pl_pos) . "<br>";
                    } else {
                        $string .= "<b>" . $pl1_name . $aspect . $pl2_name . "</b> - " . $pl1_name . " at " . Convert_Longitude($pl_pos) . "<br>";
                    }
                } else {
                    $string .= $file_array[$i];
                }
                $flag = 1;
                $i++;
            }
            break;
        }
    }
    return $string;
}
Exemple #13
0
function local_link($id_art, $id_prop, $lg)
{
    global $l;
    $txt = "";
    $values = val_prop($id_art, $id_prop);
    $values = array_unique($values);
    if (count($values) > 0) {
        for ($i = 0; $i < count($values); $i++) {
            if (isset($values[$i])) {
                $site = loc_val($values[$i], $id_prop);
                if (right($site, 1) == "/") {
                    $site = left($site, strlen($site) - 1);
                }
                if (strpos($site, "louvre")) {
                    $site = str_replace("www.", "", $site);
                }
                if ($site != "") {
                    if ($txt != "") {
                        $txt .= "</br>";
                    }
                    $txt .= "<b>" . label_item($values[$i], $lg) . "</b>&nbsp;: ";
                    /* Easter egg */
                    if ($lg == "mu") {
                        $txt .= "<a href=\"" . $site . "\" class=\"externe\">Houba</a>";
                    } else {
                        $txt .= "<a href=\"" . $site . "\" class=\"externe\">" . str_replace("http://", "", $site) . "</a>";
                    }
                }
            }
        }
    }
    return $txt;
}
Exemple #14
0
 public function display($arraydata, $y_axis = 0, $fielddata = false, $maxheight = 0)
 {
     $this->Rotate($arraydata["rotation"]);
     if ($arraydata["rotation"] != "") {
         if ($arraydata["rotation"] == "Left") {
             $w = $arraydata["width"];
             $arraydata["width"] = $arraydata["height"];
             $arraydata["height"] = $w;
             $this->pdf->SetXY($this->pdf->GetX() - $arraydata["width"], $this->pdf->GetY());
         } elseif ($arraydata["rotation"] == "Right") {
             $w = $arraydata["width"];
             $arraydata["width"] = $arraydata["height"];
             $arraydata["height"] = $w;
             $this->pdf->SetXY($this->pdf->GetX(), $this->pdf->GetY() - $arraydata["height"]);
         } elseif ($arraydata["rotation"] == "UpsideDown") {
             //soverflow"=>$stretchoverflow,"poverflow"
             $arraydata["soverflow"] = true;
             $arraydata["poverflow"] = true;
             //   $w=$arraydata["width"];
             // $arraydata["width"]=$arraydata["height"];
             //$arraydata["height"]=$w;
             $this->pdf->SetXY($this->pdf->GetX() - $arraydata["width"], $this->pdf->GetY() - $arraydata["height"]);
         }
     }
     if ($arraydata["type"] == "SetFont") {
         $arraydata["font"] = strtolower($arraydata["font"]);
         if (file_exists($fontfile) || $this->bypassnofont == false) {
             $fontfile = $this->fontdir . '/' . $arraydata["font"] . '.php';
             $this->pdf->SetFont($arraydata["font"], $arraydata["fontstyle"], $arraydata["fontsize"], $fontfile);
         } else {
             $arraydata["font"] = "freeserif";
             if ($arraydata["fontstyle"] == "") {
                 $this->pdf->SetFont('freeserif', $arraydata["fontstyle"], $arraydata["fontsize"], $this->fontdir . '/freeserif.php');
             } elseif ($arraydata["fontstyle"] == "B") {
                 $this->pdf->SetFont('freeserifb', $arraydata["fontstyle"], $arraydata["fontsize"], $this->fontdir . '/freeserifb.php');
             } elseif ($arraydata["fontstyle"] == "I") {
                 $this->pdf->SetFont('freeserifi', $arraydata["fontstyle"], $arraydata["fontsize"], $this->fontdir . '/freeserifi.php');
             } elseif ($arraydata["fontstyle"] == "BI") {
                 $this->pdf->SetFont('freeserifbi', $arraydata["fontstyle"], $arraydata["fontsize"], $this->fontdir . '/freeserifbi.php');
             } elseif ($arraydata["fontstyle"] == "BIU") {
                 $this->pdf->SetFont('freeserifbi', "BIU", $arraydata["fontsize"], $this->fontdir . '/freeserifbi.php');
             } elseif ($arraydata["fontstyle"] == "U") {
                 $this->pdf->SetFont('freeserif', "U", $arraydata["fontsize"], $this->fontdir . '/freeserif.php');
             } elseif ($arraydata["fontstyle"] == "BU") {
                 $this->pdf->SetFont('freeserifb', "U", $arraydata["fontsize"], $this->fontdir . '/freeserifb.php');
             } elseif ($arraydata["fontstyle"] == "IU") {
                 $this->pdf->SetFont('freeserifi', "IU", $arraydata["fontsize"], $this->fontdir . '/freeserifbi.php');
             }
         }
     } elseif ($arraydata["type"] == "subreport") {
         return $this->runSubReport($arraydata, $y_axis);
     } elseif ($arraydata["type"] == "MultiCell") {
         if ($fielddata == false) {
             $this->checkoverflow($arraydata, $this->updatePageNo($arraydata["txt"]), '', $maxheight);
         } elseif ($fielddata == true) {
             $this->checkoverflow($arraydata, $this->updatePageNo($this->analyse_expression($arraydata["txt"], $arraydata["isPrintRepeatedValues"])), $maxheight);
         }
     } elseif ($arraydata["type"] == "SetXY") {
         $this->pdf->SetXY($arraydata["x"] + $this->arrayPageSetting["leftMargin"], $arraydata["y"] + $y_axis);
     } elseif ($arraydata["type"] == "Cell") {
         //                print_r($arraydata);
         //              echo "<br/>";
         $this->pdf->Cell($arraydata["width"], $arraydata["height"], $this->updatePageNo($arraydata["txt"]), $arraydata["border"], $arraydata["ln"], $arraydata["align"], $arraydata["fill"], $arraydata["link"] . "", 0, true, "T", $arraydata["valign"]);
     } elseif ($arraydata["type"] == "Rect") {
         if ($arraydata['mode'] == 'Transparent') {
             $style = '';
         } else {
             $style = 'FD';
         }
         //      $this->pdf->SetLineStyle($arraydata['border']);
         $this->pdf->Rect($arraydata["x"] + $this->arrayPageSetting["leftMargin"], $arraydata["y"] + $y_axis, $arraydata["width"], $arraydata["height"], $style, $arraydata['border'], $arraydata['fillcolor']);
     } elseif ($arraydata["type"] == "RoundedRect") {
         if ($arraydata['mode'] == 'Transparent') {
             $style = '';
         } else {
             $style = 'FD';
         }
         //
         //        $this->pdf->SetLineStyle($arraydata['border']);
         $this->pdf->RoundedRect($arraydata["x"] + $this->arrayPageSetting["leftMargin"], $arraydata["y"] + $y_axis, $arraydata["width"], $arraydata["height"], $arraydata["radius"], '1111', $style, $arraydata['border'], $arraydata['fillcolor']);
     } elseif ($arraydata["type"] == "Ellipse") {
         //$this->pdf->SetLineStyle($arraydata['border']);
         $this->pdf->Ellipse($arraydata["x"] + $arraydata["width"] / 2 + $this->arrayPageSetting["leftMargin"], $arraydata["y"] + $y_axis + $arraydata["height"] / 2, $arraydata["width"] / 2, $arraydata["height"] / 2, 0, 0, 360, 'FD', $arraydata['border'], $arraydata['fillcolor']);
     } elseif ($arraydata["type"] == "Image") {
         //echo $arraydata["path"];
         $path = $this->analyse_expression($arraydata["path"]);
         $imgtype = substr($path, -3);
         $arraydata["link"] = $arraydata["link"] . "";
         if ($imgtype == 'jpg' || right($path, 3) == 'jpg' || right($path, 4) == 'jpeg') {
             $imgtype = "JPEG";
         } elseif ($imgtype == 'png' || $imgtype == 'PNG') {
             $imgtype = "PNG";
         }
         //echo $path;
         if (file_exists($path) || left($path, 4) == 'http') {
             //$path="/Applications/XAMPP/xamppfiles/simbiz/modules/simantz/images/modulepic.jpg";
             //  $path="/simbiz/images/pendingno.png";
             if ($arraydata["link"] == "") {
                 $this->pdf->Image($path, $arraydata["x"] + $this->arrayPageSetting["leftMargin"], $arraydata["y"] + $y_axis, $arraydata["width"], $arraydata["height"], $imgtype, $arraydata["link"]);
             } else {
                 //                 if($arraydata['linktarget']=='Blank' && strpos($_SERVER['HTTP_USER_AGENT'],"Safari")!==false &&     strpos($_SERVER['HTTP_USER_AGENT'],"Chrome")==false){
                 //                        $href="javascript:window.open('".$arraydata["link"]."');";
                 //                        $imagehtml='<A  href="'.$href.'"><img src="'.$path.'" '.
                 //                                'width="'. $arraydata["width"] .'" height="'.$arraydata["height"].'" ></A>';
                 //                        $this->pdf->writeHTMLCell($arraydata["width"],$arraydata["height"],
                 //                            $arraydata["x"]+$this->arrayPageSetting["leftMargin"],$arraydata["y"]+$y_axis,$imagehtml);
                 //                 }
                 //                else
                 $this->pdf->Image($path, $arraydata["x"] + $this->arrayPageSetting["leftMargin"], $arraydata["y"] + $y_axis, $arraydata["width"], $arraydata["height"], $imgtype, $arraydata["link"]);
             }
         } elseif (left($path, 22) == "data:image/jpeg;base64") {
             $imgtype = "JPEG";
             $img = str_replace('data:image/jpeg;base64,', '', $path);
             $imgdata = base64_decode($img);
             $this->pdf->Image('@' . $imgdata, $arraydata["x"] + $this->arrayPageSetting["leftMargin"], $arraydata["y"] + $y_axis, $arraydata["width"], $arraydata["height"], '', $arraydata["link"]);
         } elseif (left($path, 22) == "data:image/png;base64,") {
             $imgtype = "PNG";
             // $this->pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
             $img = str_replace('data:image/png;base64,', '', $path);
             $imgdata = base64_decode($img);
             $this->pdf->Image('@' . $imgdata, $arraydata["x"] + $this->arrayPageSetting["leftMargin"], $arraydata["y"] + $y_axis, $arraydata["width"], $arraydata["height"], '', $arraydata["link"]);
         }
     } elseif ($arraydata["type"] == "SetTextColor") {
         $this->textcolor_r = $arraydata['r'];
         $this->textcolor_g = $arraydata['g'];
         $this->textcolor_b = $arraydata['b'];
         if ($this->hideheader == true && $this->currentband == 'pageHeader') {
             $this->pdf->SetTextColor(100, 33, 30);
         } else {
             $this->pdf->SetTextColor($arraydata["r"], $arraydata["g"], $arraydata["b"]);
         }
     } elseif ($arraydata["type"] == "SetDrawColor") {
         $this->drawcolor_r = $arraydata['r'];
         $this->drawcolor_g = $arraydata['g'];
         $this->drawcolor_b = $arraydata['b'];
         $this->pdf->SetDrawColor($arraydata["r"], $arraydata["g"], $arraydata["b"]);
     } elseif ($arraydata["type"] == "SetLineWidth") {
         $this->pdf->SetLineWidth($arraydata["width"]);
     } elseif ($arraydata["type"] == "break") {
     } elseif ($arraydata["type"] == "Line") {
         $this->pdf->Line($arraydata["x1"] + $this->arrayPageSetting["leftMargin"], $arraydata["y1"] + $y_axis, $arraydata["x2"] + $this->arrayPageSetting["leftMargin"], $arraydata["y2"] + $y_axis, $arraydata["style"]);
     } elseif ($arraydata["type"] == "SetFillColor") {
         $this->fillcolor_r = $arraydata['r'];
         $this->fillcolor_g = $arraydata['g'];
         $this->fillcolor_b = $arraydata['b'];
         $this->pdf->SetFillColor($arraydata["r"], $arraydata["g"], $arraydata["b"]);
     } elseif ($arraydata["type"] == "lineChart") {
         $this->showLineChart($arraydata, $y_axis);
     } elseif ($arraydata["type"] == "barChart") {
         $this->showBarChart($arraydata, $y_axis, 'barChart');
     } elseif ($arraydata["type"] == "pieChart") {
         $this->showPieChart($arraydata, $y_axis);
     } elseif ($arraydata["type"] == "stackedBarChart") {
         $this->showBarChart($arraydata, $y_axis, 'stackedBarChart');
     } elseif ($arraydata["type"] == "stackedAreaChart") {
         $this->showAreaChart($arraydata, $y_axis, $arraydata["type"]);
     } elseif ($arraydata["type"] == "Barcode") {
         $this->showBarcode($arraydata, $y_axis);
     } elseif ($arraydata["type"] == "CrossTab") {
         $this->showCrossTab($arraydata, $y_axis);
     }
 }
Exemple #15
0
function startsWith($str, $check)
{
    return left($str, strlen($check)) == $check;
}
Exemple #16
0
 public function fdecimal($conteudo = '', $qt = 2, $tp = 1)
 {
     if (!$conteudo) {
         $conteudo = 0;
     }
     if ($tp == 1) {
         $conteudo = number_format($conteudo, $qt, ',', '.');
     } elseif ($tp == 3) {
         $conteudo = number_format($conteudo, $qt, '.', '');
     } elseif ($tp == 4) {
         //retira pontos e virgulas, deixa somente números
         $conteudo = number_format($conteudo, $qt, '', '');
     } else {
         $conteudo = left($conteudo, strlen($conteudo) - $qt) . "," . right($conteudo, $qt);
     }
     return $conteudo;
 }
Exemple #17
0
    $conn->Execute($sSql2);
}
$sSql = "SELECT * FROM patient_detail a, patient_main b ";
$sSql .= "WHERE a.PatientID=b.PatientID AND a.StudyID='" . $sid . "' ";
//$sSql.="AND a.StudyID=c.StudyID ";
//$sSql.="GROUP BY a.StudyID";
//echo $sSql;
if ($rs = $conn->Execute($sSql)) {
    $rs->MoveFirst();
    if (!$rs->EOF) {
        $DetailNo = $rs->fields('DetailNo');
        $StudyID = $rs->fields('StudyID');
        $PatientID = $rs->fields('PatientID');
        $PatientName = $rs->fields('PatientName');
        $PatientBirthDate = $rs->fields('PatientBirthDate');
        $PatientAge = date(Y) - left($PatientBirthDate, 4);
        $PatientSex = $rs->fields('PatientSex');
        $StudyDate = $rs->fields('StudyDate');
        $datefrom = $StudyDate;
        $StudyTime = $rs->fields('StudyTime');
        $Modality = $rs->fields('Modality');
        $BodyPartExamined = $rs->fields('BodyPartExamined');
        $ProtocolName = $rs->fields('ProtocolName');
        $InstanceNumber = $rs->fields('InstanceNumber');
        $Status = $rs->fields('Status');
        //$AddPatient=$rs->fields('AdditionalPatientHistory');
        //--取得病歷內容 exam_data
        $sSql3 = "SELECT * FROM exam_data ";
        $sSql3 .= "WHERE StudyID='" . $StudyID . "'";
        if ($rs3 = $conn->Execute($sSql3)) {
            $rs3->MoveFirst();
Exemple #18
0
function delJsNote($content)
{
    $splstr = '';
    $s = '';
    $c = '';
    $isMultiLineNote = '';
    $s2 = '';
    $isMultiLineNote = false;
    //多行注释默认为假
    $splstr = aspSplit($content, vbCrlf());
    foreach ($splstr as $key => $s) {
        $s2 = PHPTrim($s);
        if ($isMultiLineNote == true) {
            if (len($s2) >= 2) {
                if (right($s2, 2) == '*/') {
                    $isMultiLineNote = false;
                }
            }
            $s = '';
        } else {
            if (left($s2, 2) == '/*') {
                if (right($s2, 2) != '*/') {
                    $isMultiLineNote = true;
                }
                $s = '';
            } else {
                if (left($s2, 2) == '//') {
                    $s = '';
                }
            }
        }
        $c = $c . $s . vbCrlf();
    }
    $delJsNote = $c;
    return @$delJsNote;
}
function setHtmlParam($content, $ParamList)
{
    $splStr = '';
    $startStr = '';
    $endStr = '';
    $c = '';
    $paramValue = '';
    $ReplaceStartStr = '';
    $endStr = '\'';
    $splStr = aspSplit($ParamList, '|');
    foreach ($splStr as $key => $startStr) {
        $startStr = aspTrim($startStr);
        if ($startStr != '') {
            //替换开始字符   因为开始字符类型可变 不同
            $ReplaceStartStr = $startStr;
            if (left($ReplaceStartStr, 3) == 'img') {
                $ReplaceStartStr = mid($ReplaceStartStr, 4, -1);
            } else {
                if (left($ReplaceStartStr, 1) == 'a') {
                    $ReplaceStartStr = mid($ReplaceStartStr, 2, -1);
                } else {
                    if (inStr('|ul|li|', '|' . left($ReplaceStartStr, 2) . '|') > 0) {
                        $ReplaceStartStr = mid($ReplaceStartStr, 3, -1);
                    }
                }
            }
            $ReplaceStartStr = ' ' . $ReplaceStartStr . '=\'';
            $startStr = ' ' . $startStr . '=\'';
            if (inStr($content, $startStr) > 0 && inStr($content, $endStr) > 0) {
                $paramValue = StrCut($content, $startStr, $endStr, 2);
                $paramValue = HandleInModule($paramValue, 'end');
                //处理内部模块
                $c = $c . $ReplaceStartStr . $paramValue . $endStr;
            }
        }
    }
    $setHtmlParam = $c;
    return @$setHtmlParam;
}
Exemple #20
0
function handleScanUrlList($httpurl, $urlList)
{
    $splstr = '';
    $url = '';
    $c = '';
    $lCaseUrl = '';
    $splstr = aspSplit($urlList, vbCrlf());
    foreach ($splstr as $key => $url) {
        $url = PHPTrim($url);
        $lCaseUrl = lCase($url);
        if ($url != '' && left($url, 10) != 'tencent://' && left($url, 11) != 'javascript:' && left($url, 1) != '#') {
            $url = fullHttpUrl($httpurl, $url);
            if (inStr(vbCrlf() . $c . vbCrlf(), vbCrlf() . $url . vbCrlf()) == false) {
                $c = $c . $url . vbCrlf();
            }
        }
    }
    $handleScanUrlList = $c;
    return @$handleScanUrlList;
}
Exemple #21
0
    list($total) = mysql_fetch_row($fail);
    $left = $INSTALLER09['failedlogins'] - $total;
    if ($left <= 2) {
        $left = "<font color='red' size='4'>" . $left . "</font>";
    } else {
        $left = "<font color='green' size='4'>" . $left . "</font>";
    }
    return $left;
}
//== End Failed logins
$HTMLOUT = '';
unset($returnto);
if (!empty($_GET["returnto"])) {
    $returnto = htmlspecialchars($_GET["returnto"]);
    if (!isset($_GET["nowarn"])) {
        $HTMLOUT .= "<h1>{$lang['login_not_logged_in']}</h1>\n";
        $HTMLOUT .= "{$lang['login_error']}";
    }
}
$value = array('...', '...', '...', '...', '...', '...');
$value[rand(1, count($value) - 1)] = 'X';
$HTMLOUT .= "<script type='text/javascript' src='scripts/jquery.js'></script>\r\n    <script type='text/javascript' src='scripts/jquery.simpleCaptcha-0.2.js'></script>\r\n    <script type='text/javascript'>\r\n\t  /*<![CDATA[*/\r\n\t  \$(document).ready(function () {\r\n\t  \$('#captchalogin').simpleCaptcha();\r\n    });\r\n    /*]]>*/\r\n    </script>\r\n    <form method='post' action='takelogin.php'>\r\n    <noscript>Javascript must be enabled to login and use this site</noscript>\r\n    <p>Note: You need cookies enabled to log in.</p>                                              \r\n    <p>Note: if your experiencing login issues delete your old cookies.</p>  \r\n    <b>[{$INSTALLER09['failedlogins']}]</b> Failed logins in a row will ban your ip from access<br />You have <b> " . left() . " </b> login attempt(s) remaining.<br /><br />\r\n    <table border='0' cellpadding='5'>\r\n      <tr>\r\n        <td class='rowhead'>{$lang['login_username']}</td>\r\n        <td align='left'><input type='text' size='40' name='username' /></td>\r\n      </tr>\r\n      <tr>\r\n        <td class='rowhead'>{$lang['login_password']}</td>\r\n        <td align='left'><input type='password' size='40' name='password' /></td>\r\n      </tr>\t\r\n     <tr>\r\n     <td class='rowhead'>Use ssl</td>\r\n     <td>\r\n     <label for='ssl'>Browse the site using a secure connection just this session <input type='checkbox' name='use_ssl' checked='checked' value='1' id='ssl'/></label><br/>\r\n     <label for='ssl2'>Browse the site using a secure connection permanently<input type='checkbox' name='perm_ssl' value='1' id='ssl2'/></label>\r\n     </td>\r\n     </tr>\r\n     <tr>\r\n     <td align='left' class='rowhead' colspan='2' id='captchalogin'></td>\r\n     </tr>\r\n     <tr>\r\n     <td align='center' colspan='2'>Now click the button marked <strong>X</strong></td>\r\n     </tr>\r\n     <tr>\r\n     <td colspan='2' align='center'>";
for ($i = 0; $i < count($value); $i++) {
    $HTMLOUT .= "<input name=\"submitme\" type=\"submit\" value=\"" . $value[$i] . "\" class=\"btn\" />";
}
$HTMLOUT .= "</td></tr></table>";
if (isset($returnto)) {
    $HTMLOUT .= "<input type='hidden' name='returnto' value='" . htmlentities($returnto) . "' />\n";
}
$HTMLOUT .= "</form>\r\n     {$lang['login_signup']}{$lang['login_forgot']}";
print stdhead("{$lang['login_login_btn']}") . $HTMLOUT . stdfoot();
Exemple #22
0
<?php

$content = $acry_in;
if (strpos($content, "redirected from") === false) {
    $needle = '<th>Definition</th>';
    $pth = stripos($content, $needle);
    if ($pth !== false) {
        $pt = $pth + 14;
        $out = substr("{$content}", $pt);
        $pa = stripos($out, '</table>');
        $out = left("{$out}", $pa);
        $x = 0;
        while (($aa = stripos($out, '<td class=acr>')) !== false) {
            if ($x > 500) {
                break;
            }
            $aend = stripos($out, '</td>', $aa);
            $killer = substr($out, $aa, $aend - $aa);
            $out = str_replace($killer, '', $out);
            $x++;
        }
        $word = trim(strip_tags($killer));
        $out = str_replace("</td>", '', $out);
        $out = str_replace("</tr>", " \n", $out);
        $out = strip_tags($out);
        $out = $word . " may refer to :" . $out;
        $acry_return = trim($out);
        $files = DATA_PATH . "/acry/{$global_id}";
        @unlink($files);
        file_put_contents($files, $acry_return);
    }
<?php

include "system.php";
$action = $_GET['action'];
if (!isset($action) || $action == 'create') {
    include "../simantz/class/pchart/pChart/pData.class";
    include "../simantz/class/pchart/pChart/pChart.class";
    //$oriyear= date("Y",time());
    //$orimonth=date("m",time());
    //$oriyear=2008;
    //$orimonth=8;
    $orimonth = right(left(getDateSession(), 7), 2);
    $oriyear = left(getDateSession(), 4);
    $p = array();
    $arrtotalamt = array();
    //$period1=$period->getPeriodID($year,$month);
    for ($i = 5; $i >= 0; $i--) {
        $year = $oriyear;
        $month = $orimonth - $i;
        if ($month <= 0) {
            $month = $month + 12;
            $year = $year - 1;
        }
        if (strlen($month) == 1) {
            $month = "0" . $month;
        }
        //$period1=$period->getPeriodID($year,$month);
        $curperiodname = $year . '-' . $month;
        array_push($p, $year . '-' . $month);
        $sql = "SELECT '{$curperiodname}',coalesce(sum(localamt),0) as totalamt\n                FROM sim_bpartner_quotation q\n                where q.iscomplete=1 and  left(CAST( q.document_date AS CHAR),7)='{$curperiodname}'\n                group by left(CAST( q.document_date AS CHAR),7)";
        $query = $xoopsDB->query($sql);
    if ($left <= 2) {
        $left = "<span style='color:red'>{$left}</span>";
    } else {
        $left = "<span style='color:green'>{$left}</span>";
    }
    return $left;
}
//== End Failed logins
$HTMLOUT = '';
unset($returnto);
if (!empty($_GET["returnto"])) {
    $returnto = htmlsafechars($_GET["returnto"]);
    if (!isset($_GET["nowarn"])) {
        $HTMLOUT .= "<div class='login-container center-block'><h1>{$lang['login_not_logged_in']}</h1>\n";
        $HTMLOUT .= "{$lang['login_error']}";
        $HTMLOUT .= "<h4>{$lang['login_cookies']}</h4>\n        <h4>{$lang['login_cookies1']}</h4>\n        <h4>\n        <b>[{$INSTALLER09['failedlogins']}]</b> {$lang['login_failed']}<br />{$lang['login_failed_1']} <b> " . left() . " </b> {$lang['login_failed_2']}</h4></div>";
    }
}
$got_ssl = isset($_SERVER['HTTPS']) && (bool) $_SERVER['HTTPS'] == true ? true : false;
//== click X by Retro
$value = array('...', '...', '...', '...', '...', '...');
$value[rand(1, count($value) - 1)] = 'X';
$HTMLOUT .= "<script type='text/javascript'>\n\t  /*<![CDATA[*/\n\t  \$(document).ready(function () {\n\t  \$('#captchalogin').simpleCaptcha();\n    });\n    /*]]>*/\n    </script>\n<div class='login-container center-block'>\n    <form class='well form-inline' method='post' action='takelogin.php'>\n<table class='table  table-bordered center-block'>    \n<tr>\n    <td>{$lang['login_username']}</td><td align='left'><input type='text' size='40' name='username' /></td></tr>\n    <tr><td>{$lang['login_password']}</td><td align='left'><input type='password' size='40' name='password' /></td></tr>\n    <tr><td>{$lang['login_use_ssl']}</td>\n    <td>\n    <label class='label label-inverse' for='ssl'>{$lang['login_ssl1']}&nbsp;<input type='checkbox' name='use_ssl' " . ($got_ssl ? "checked='checked'" : "disabled='disabled' title='SSL connection not available'") . " value='1' id='ssl'/></label><br/>\n    <label class='label label-inverse' for='ssl2'>{$lang['login_ssl2']}&nbsp;<input type='checkbox' name='perm_ssl' " . ($got_ssl ? "" : "disabled='disabled' title='SSL connection not available'") . " value='1' id='ssl2'/></label>\n    </td>\n    </tr>" . ($INSTALLER09['captcha_on'] ? "<tr><td align='center' class='rowhead' colspan='2' id='captchalogin'></td></tr>" : "") . "\n    <tr><td colspan='2'><em class='center-block'>{$lang['login_click']}<strong>{$lang['login_x']}</strong></em></td></tr>\n    <tr><td colspan='2'>";
for ($i = 0; $i < count($value); $i++) {
    $HTMLOUT .= "<span style='margin-left:9%; float:left;'><input name=\"submitme\" type=\"submit\" value=\"{$value[$i]}\" class=\"btn btn-small\" /></span>";
}
if (isset($returnto)) {
    $HTMLOUT .= "<input type='hidden' name='returnto' value='" . htmlsafechars($returnto) . "' />\n";
}
$HTMLOUT .= "</td></tr><tr><td colspan='2' class='center-block'><span class='offset1'><em class='btn btn-mini'><strong>{$lang['login_signup']}</strong></em>&nbsp;&nbsp;&nbsp;&nbsp;<em class='btn btn-mini'><strong>{$lang['login_forgot']}</strong></em>&nbsp;&nbsp;&nbsp;&nbsp;<em class='btn btn-mini'><strong>{$lang['login_forgot_1']}</strong></em></span></td></tr></table></form></div>";
echo stdhead("{$lang['login_login_btn']}", true) . $HTMLOUT . stdfoot($stdfoot);
Exemple #25
0
function getBrType($theInfo)
{
    $strType = '';
    $tmp1 = '';
    $s = '';
    $s = 'Other Unknown';
    if ($theInfo == '') {
        $theInfo = uCase(serverVariables('HTTP_USER_AGENT'));
    }
    if (inStr($theInfo, uCase('mozilla')) > 0) {
        $s = 'Mozilla';
    }
    if (inStr($theInfo, uCase('icab')) > 0) {
        $s = 'iCab';
    }
    if (inStr($theInfo, uCase('lynx')) > 0) {
        $s = 'Lynx';
    }
    if (inStr($theInfo, uCase('links')) > 0) {
        $s = 'Links';
    }
    if (inStr($theInfo, uCase('elinks')) > 0) {
        $s = 'ELinks';
    }
    if (inStr($theInfo, uCase('jbrowser')) > 0) {
        $s = 'JBrowser';
    }
    if (inStr($theInfo, uCase('konqueror')) > 0) {
        $s = 'konqueror';
    }
    if (inStr($theInfo, uCase('wget')) > 0) {
        $s = 'wget';
    }
    if (inStr($theInfo, uCase('ask jeeves')) > 0 || inStr($theInfo, uCase('teoma')) > 0) {
        $s = 'Ask Jeeves/Teoma';
    }
    if (inStr($theInfo, uCase('wget')) > 0) {
        $s = 'wget';
    }
    if (inStr($theInfo, uCase('opera')) > 0) {
        $s = 'opera';
    }
    if (inStr($theInfo, uCase('NOKIAN')) > 0) {
        $s = 'NOKIAN(诺基亚手机)';
    }
    if (inStr($theInfo, uCase('SPV')) > 0) {
        $s = 'SPV(多普达手机)';
    }
    if (inStr($theInfo, uCase('Jakarta Commons')) > 0) {
        $s = 'Jakarta Commons-HttpClient';
    }
    if (inStr($theInfo, uCase('Gecko')) > 0) {
        $strType = '[Gecko] ';
        $s = 'Mozilla Series';
        if (inStr($theInfo, uCase('aol')) > 0) {
            $s = 'AOL';
        }
        if (inStr($theInfo, uCase('netscape')) > 0) {
            $s = 'Netscape';
        }
        if (inStr($theInfo, uCase('firefox')) > 0) {
            $s = 'FireFox';
        }
        if (inStr($theInfo, uCase('chimera')) > 0) {
            $s = 'Chimera';
        }
        if (inStr($theInfo, uCase('camino')) > 0) {
            $s = 'Camino';
        }
        if (inStr($theInfo, uCase('galeon')) > 0) {
            $s = 'Galeon';
        }
        if (inStr($theInfo, uCase('k-meleon')) > 0) {
            $s = 'K-Meleon';
        }
        $s = $strType . $s;
    }
    if (inStr($theInfo, uCase('bot')) > 0 || inStr($theInfo, uCase('crawl')) > 0) {
        $strType = '[Bot/Crawler]';
        if (inStr($theInfo, uCase('grub')) > 0) {
            $s = 'Grub';
        }
        if (inStr($theInfo, uCase('googlebot')) > 0) {
            $s = 'GoogleBot';
        }
        if (inStr($theInfo, uCase('msnbot')) > 0) {
            $s = 'MSN Bot';
        }
        if (inStr($theInfo, uCase('slurp')) > 0) {
            $s = 'Yahoo! Slurp';
        }
        $s = $strType . $s;
    }
    if (inStr($theInfo, uCase('applewebkit')) > 0) {
        $strType = '[AppleWebKit]';
        $s = '';
        if (inStr($theInfo, uCase('omniweb')) > 0) {
            $s = 'OmniWeb';
        }
        if (inStr($theInfo, uCase('safari')) > 0) {
            $s = 'Safari';
        }
        $s = $strType . $s;
    }
    if (inStr($theInfo, uCase('msie')) > 0) {
        $strType = '[MSIE';
        $tmp1 = mid($theInfo, inStr($theInfo, uCase('MSIE')) + 4, 6);
        $tmp1 = left($tmp1, inStr($tmp1, ';') - 1);
        $strType = $strType . $tmp1 . ']';
        $s = 'Internet Explorer';
        $s = $strType . $s;
    }
    if (inStr($theInfo, uCase('msn')) > 0) {
        $s = 'MSN';
    }
    if (inStr($theInfo, uCase('aol')) > 0) {
        $s = 'AOL';
    }
    if (inStr($theInfo, uCase('webtv')) > 0) {
        $s = 'WebTV';
    }
    if (inStr($theInfo, uCase('myie2')) > 0) {
        $s = 'MyIE2';
    }
    if (inStr($theInfo, uCase('maxthon')) > 0) {
        $s = 'Maxthon(傲游浏览器)';
    }
    if (inStr($theInfo, uCase('gosurf')) > 0) {
        $s = 'GoSurf(冲浪高手浏览器)';
    }
    if (inStr($theInfo, uCase('netcaptor')) > 0) {
        $s = 'NetCaptor';
    }
    if (inStr($theInfo, uCase('sleipnir')) > 0) {
        $s = 'Sleipnir';
    }
    if (inStr($theInfo, uCase('avant browser')) > 0) {
        $s = 'AvantBrowser';
    }
    if (inStr($theInfo, uCase('greenbrowser')) > 0) {
        $s = 'GreenBrowser';
    }
    if (inStr($theInfo, uCase('slimbrowser')) > 0) {
        $s = 'SlimBrowser';
    }
    if (inStr($theInfo, uCase('360SE')) > 0) {
        $s = $s . '-360SE(360安全浏览器)';
    }
    if (inStr($theInfo, uCase('QQDownload')) > 0) {
        $s = $s . '-QQDownload(QQ下载器)';
    }
    if (inStr($theInfo, uCase('TheWorld')) > 0) {
        $s = $s . '-TheWorld(世界之窗浏览器)';
    }
    if (inStr($theInfo, uCase('icafe8')) > 0) {
        $s = $s . '-icafe8(网维大师网吧管理插件)';
    }
    if (inStr($theInfo, uCase('TencentTraveler')) > 0) {
        $s = $s . '-TencentTraveler(腾讯TT浏览器)';
    }
    if (inStr($theInfo, uCase('baiduie8')) > 0) {
        $s = $s . '-baiduie8(百度IE8.0)';
    }
    if (inStr($theInfo, uCase('iCafeMedia')) > 0) {
        $s = $s . '-iCafeMedia(网吧网媒趋势插件)';
    }
    if (inStr($theInfo, uCase('DigExt')) > 0) {
        $s = $s . '-DigExt(IE5允许脱机阅读模式特殊标记)';
    }
    if (inStr($theInfo, uCase('baiduds')) > 0) {
        $s = $s . '-baiduds(百度硬盘搜索)';
    }
    if (inStr($theInfo, uCase('CNCDialer')) > 0) {
        $s = $s . '-CNCDialer(数控拨号)';
    }
    if (inStr($theInfo, uCase('NOKIAN85')) > 0) {
        $s = $s . '-NOKIAN85(诺基亚手机)';
    }
    if (inStr($theInfo, uCase('SPV_C600')) > 0) {
        $s = $s . '-SPV_C600(多普达C600)';
    }
    if (inStr($theInfo, uCase('Smartphone')) > 0) {
        $s = $s . '-Smartphone(Windows Mobile for Smartphone Edition 操作系统的智能手机)';
    }
    $getBrType = $s;
    return @$getBrType;
}
	include_once('ressources/class.users.menus.inc');
	include_once('ressources/class.squid.inc');
	include_once('ressources/class.status.inc');
	include_once('ressources/class.artica.graphs.inc');
	
	$users=new usersMenus();
	if(!$users->AsWebStatisticsAdministrator){die();}	

	
	if(!isset($_GET["day"])){$_GET["day"]=date("Y-m-d");}
	if(!isset($_GET["type"])){$_GET["type"]="size";}
	if($_GET["type"]==null){$_GET["type"]="size";}
	if($_GET["day"]==null){$q=new mysql_squid_builder();$_GET["day"]=date("Y-m-d");}		
	
	if(isset($_GET["day-right-infos"])){right();die();}
	if(isset($_GET["days-left-menus"])){left();die();}
	if(isset($_GET["today-zoom"])){today_zoom_js();exit;}
	if(isset($_GET["today-zoom-popup"])){today_zoom_popup();exit;}
	if(isset($_GET["today-zoom-popup-list"])){today_zoom_popup_list();exit;}
	if(isset($_GET["statistics-days-left-status"])){left_status();exit;}
	if(isset($_GET["view-table"])){view_table();exit;}
	if(isset($_GET["Zoom-js"])){ZOOM_JS();exit;}
	if(isset($_GET["block-zoom-popup"])){ZOOM_POPUP();exit;}
	
page();

function ZOOM_JS(){
	$ID=$_GET["Zoom-js"];
	$q=new mysql_squid_builder();
	$key="ID";
	if($_GET["key"]<>null){$key="{$_GET["key"]}";}
Exemple #27
0
<style>td p{width:100%;max-width:300px;text-align:center;}</style><dl id="cs">
    <dt><?php 
echo left();
?>
</dt>
    <dd>
    <b id="dtt"><a href="./">管理中心</a> &gt; <?php 
echo $sTitle;
?>
</b>
    <table id="lis">
        <tr><td colspan="7"><form method="get" action="" id="fr"><input type="hidden" id="act"  name="act" value="list"/>
            资料标题:<input type="text" id="name"  name="name" style="width:100px;" value="<?php 
echo $_GET['name'];
?>
"/> 状态:<select id="status" name="status"><option value="0">所有状态</option><?php 
if (!empty($aStatus)) {
    foreach ($aStatus as $k => $v) {
        echo '<option value="' . ($k + 1) . '"' . ($_GET['status'] == $k + 1 ? ' selected=""' : '') . '>' . $v . '</option>';
    }
}
?>
</select><input type="submit" value="搜索"/>
        </form></td></tr>
        <tr><th>序号</th>
            <th>资料标题</th>
            <th>资料类型</th>
            <th>发布时间</th>
            <th>附件</th>
            <th>状态</th>
            <th>操作</th>
Exemple #28
0
<?php

$recipe_kw = array("recipe", "recipes", "recipe of", "how to cook", "cook", "recepe");
//recipe search
$check_recipe = "recipe of list";
if (left($req, strlen($check_recipe)) == $check_recipe) {
    $recipe_status = true;
    include 'recipesearch.php';
    if (!empty($return_value)) {
        $total_return = $res_return;
        include 'allmanip.php';
        $to_logserver['source'] = 'recipe';
        putOutput($total_return);
        exit;
    } else {
        $list = array();
        $options_list = array();
    }
}
if (preg_match("~\\b(recipe of|recipe|recipes|how to cook|cook)\\b(.+)~", $spell_checked, $match)) {
    echo "<br>RECIPE SEARCH<br>";
    print_r($match);
    if (preg_match("~^[^\\w]*recipe~", $spell_checked)) {
        $recipe_must = true;
    }
    $recipe = $match[2];
    include 'recipesearch.php';
    if ($res_return) {
        $total_return = $res_return;
        include 'allmanip.php';
        $to_logserver['source'] = 'recipe';
Exemple #29
0
function Find_Specific_Report_Paragraph($phrase_to_look_for, $file)
{
    $string = "";
    $len = strlen($phrase_to_look_for);
    //put entire file contents into an array, line by line
    $file_array = file($file);
    // look through each line searching for $phrase_to_look_for
    for ($i = 0; $i < count($file_array); $i++) {
        if (left(trim($file_array[$i]), $len) == $phrase_to_look_for) {
            $flag = 0;
            while (trim($file_array[$i]) != "*") {
                if ($flag == 0) {
                    $string .= "<b>" . $file_array[$i] . "</b>";
                } else {
                    $string .= $file_array[$i];
                }
                $flag = 1;
                $i++;
            }
            break;
        }
    }
    return $string;
}
Exemple #30
0
function handleDoubleQuotation($s)
{
    $NewS = '';
    $NewS = PHPTrim($s);
    if (left($NewS, 1) == '"' && right($NewS, 1) == '"') {
        $s = mid($NewS, 2, len($NewS) - 2);
    }
    $handleDoubleQuotation = $s;
    return @$handleDoubleQuotation;
}