• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP left函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中left函数的典型用法代码示例。如果您正苦于以下问题:PHP left函数的具体用法?PHP left怎么用?PHP left使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了left函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: mainAutoLoader

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;
    }
}
开发者ID:Zyr93,项目名称:DiamondMVC,代码行数:28,代码来源:autoload.php


示例2: autoloadFields

function autoloadFields($class)
{
    if (strToLower(left($class, 5)) !== 'field') {
        return;
    }
    require_once jailpath(DIAMONDMVC_ROOT . '/classes/fields', strToLower(substr($class, 5)) . '.php');
}
开发者ID:Zyr93,项目名称:DiamondMVC,代码行数:7,代码来源:fields.php


示例3: extractColors

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);
}
开发者ID:AitorMotril,项目名称:eduGraph,代码行数:10,代码来源:graficoAsignaturas.php


示例4: generateDataString

 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;
 }
开发者ID:Zyr93,项目名称:DiamondMVC,代码行数:10,代码来源:searchbox.php


示例5: textFormat

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;
}
开发者ID:acmadi,项目名称:diantaksi,代码行数:15,代码来源:printest.blade.php


示例6: getWhereAnd

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;
}
开发者ID:313801120,项目名称:AspPhpCms,代码行数:40,代码来源:ASPPHPAccess.php


示例7: error_reporting

$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;
开发者ID:gauravsaxena21,项目名称:simantz,代码行数:30,代码来源:incomestatement.php


示例8: replaceDim

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;
}
开发者ID:313801120,项目名称:AspPhpCms,代码行数:37,代码来源:function.php


示例9: dirname

}
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"])) {
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:31,代码来源:miniadmin.proxy.php


示例10: getHtmlValue

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;
}
开发者ID:313801120,项目名称:AspPhpCms,代码行数:54,代码来源:Html.php


示例11: formatting

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);
                        }
//.........这里部分代码省略.........
开发者ID:313801120,项目名称:AspPhpCms,代码行数:101,代码来源:2015_Formatting.php


示例12: Find_Specific_Report_Paragraph

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;
}
开发者ID:pumi11,项目名称:astro,代码行数:29,代码来源:progressions_form_wheel.php


示例13: local_link

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;
}
开发者ID:jjmhtp,项目名称:CROTOS,代码行数:33,代码来源:functions.php


示例14: display

 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 {
//.........这里部分代码省略.........
开发者ID:jhersonn20,项目名称:www,代码行数:101,代码来源:PHPJasperXML.php


示例15: startsWith

function startsWith($str, $check)
{
    return left($str, strlen($check)) == $check;
}
开发者ID:Zyr93,项目名称:DiamondMVC,代码行数:4,代码来源:fns.php


示例16: fdecimal

 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;
 }
开发者ID:THAYLLER,项目名称:api_sms,代码行数:17,代码来源:funcionalidades.php


示例17: date

    $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();
开发者ID:airfox7412,项目名称:ps01,代码行数:31,代码来源:DetailView_Edit.php


示例18: delJsNote

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;
}
开发者ID:313801120,项目名称:AspPhpCms,代码行数:36,代码来源:2014_Js.php


示例19: setHtmlParam

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;
}
开发者ID:313801120,项目名称:AspPhpCms,代码行数:39,代码来源:2015_APGeneral.php


示例20: handleScanUrlList

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;
}
开发者ID:313801120,项目名称:AspPhpCms,代码行数:20,代码来源:URL.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP left_menu函数代码示例发布时间:2022-05-15
下一篇:
PHP learn_press_get_template函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap