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


PHP utils::lookupField方法代码示例

本文整理汇总了PHP中utils::lookupField方法的典型用法代码示例。如果您正苦于以下问题:PHP utils::lookupField方法的具体用法?PHP utils::lookupField怎么用?PHP utils::lookupField使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在utils的用法示例。


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

示例1: create_gen_path

 public function create_gen_path($cms_id, $stepsArray, $steps_pages)
 {
     global $fpdo;
     if ($stepsArray != '') {
         $i = 0;
         $path = "<div class='row'>";
         $path .= '<div class="row bs-wizard" style="border-bottom:0;">';
         $count = count($stepsArray);
         if ($_REQUEST['gr_id_pg'] == "") {
             $group_id = $i;
         } else {
             $group_id = $_REQUEST['gr_id_pg'];
         }
         $CurrentOrder = $group_id;
         foreach ($stepsArray as $stepName) {
             if ($count < 8) {
                 $width = 100 / $count;
             } else {
                 $width = 100 / 8;
             }
             if ($i % 8 == 0) {
                 $path .= '</div><div class="row bs-wizard" style="border-bottom:0;">';
             }
             $style = 'style="width:' . $width . '%;float:left"';
             $req_id = "";
             $class2 = "";
             if ($CurrentOrder >= $i) {
                 $class = 'complete';
             } else {
                 if ($_REQUEST['id'] == "") {
                     $class2 = 'disabled';
                 }
                 $class = 'notcomplete';
             }
             if ($_REQUEST['id'] != "") {
                 $req_id = "id=" . $_REQUEST['id'] . "&table_id=" . $_REQUEST['id'] . "&gr_id_pg=" . $i;
             }
             $pageLink = $steps_pages[$i] . "?{$req_id}";
             $path .= '<div class=" bs-wizard-step ' . $class . ' ' . $class2 . '" ' . $style . '>
               <div class="text-center bs-wizard-stepnum">' . $this->getConstant("Step") . ": " . $stepName . '</div>
               <div class="progress"><div class="progress-bar"></div></div>
               <a href="' . $pageLink . '" class="bs-wizard-dot" data-group="' . $i . '"></a>
             </div>';
             $i++;
         }
         $path .= '</div></div>';
     } else {
         $groups = $fpdo->from("cms_module_fields_groups")->where("module_id", $cms_id)->fetchAll();
         if ($_REQUEST['gr_id_pg'] == "") {
             $_REQUEST['gr_id_pg'] = $first_group;
         }
         $AllGroupsArray = array();
         $AllGroups = array();
         $AllFieldsArray = array();
         $NotSavedFields = array();
         $NotSavedFieldsFullText = array();
         foreach ($groups as $group_c) {
             $id = $group_c["id"];
             array_push($AllGroupsArray, $id);
             $query_fields = $fpdo->from("cms_module_fields")->leftJoin("cms_module_fields_groups_fields on cms_module_fields.id=cms_module_fields_groups_fields.field_id")->where("grp_id = '{$id}' and table_id='" . $cms_id . "'")->fetchAll();
             if (count($query_fields) > 0) {
                 array_push($AllGroups, $id);
             }
         }
         $groups_ids = implode(',', $AllGroupsArray);
         $query_f = $fpdo->from("cms_module_fields")->leftJoin("cms_module_fields_groups_fields on cms_module_fields.id=cms_module_fields_groups_fields.field_id")->where("grp_id in ({$groups_ids}) and table_id='" . $cms_id . "'")->fetchAll();
         if (count($query_f) > 0) {
             foreach ($query_f as $row) {
                 array_push($AllFieldsArray, $row['id']);
             }
         }
         $AllSavedFields = implode(',', $AllFieldsArray);
         $getAllFields = $fpdo->from('cms_module_fields')->where("table_id='" . $cms_id . "' and id not in ({$AllSavedFields})")->fetchAll();
         foreach ($getAllFields as $allFiels) {
             if ($allFiels['type'] == 'FullTextEditor') {
                 array_push($NotSavedFieldsFullText, $allFiels['id']);
             } else {
                 array_push($NotSavedFields, $allFiels['id']);
             }
         }
         $AllNotNullGroups = implode(',', $AllGroups);
         $groups_all = $fpdo->from("cms_module_fields_groups")->where("module_id='{$cms_id}' and id in ({$AllNotNullGroups})")->fetchAll();
         $first_group = $groups_all[0]['id'];
         $path = "<div class='row'>";
         $i = 0;
         $count = count($groups_all);
         $groupCounts = 1;
         $path .= '<div class="row bs-wizard" style="border-bottom:0;">';
         $utils = new utils();
         if ($_REQUEST['gr_id_pg'] == "") {
             $group_id = $groups_all[0]['id'];
         } else {
             $group_id = $_REQUEST['gr_id_pg'];
         }
         $CurrentOrder = $utils->lookupField("cms_module_fields_groups", "id", "ord", $group_id);
         foreach ($groups_all as $row) {
             if ($count < 8) {
                 $width = 100 / $count;
             } else {
                 $width = 100 / 8;
//.........这里部分代码省略.........
开发者ID:VoilaVoila,项目名称:voilacms,代码行数:101,代码来源:Utils+-+Copy.php

示例2: create_gen_path

 public function create_gen_path($cms_id, $stepsArray, $steps_pages)
 {
     global $fpdo;
     if ($stepsArray != '') {
         $i = 0;
         $path = "<div class='row'>";
         $path .= '<div class="col-sm-12 bs-wizard" style="border-bottom:0;">';
         $count = count($stepsArray);
         if ($_REQUEST['gr_id_pg'] == "") {
             $group_id = $i;
         } else {
             $group_id = $_REQUEST['gr_id_pg'];
         }
         $CurrentOrder = $group_id;
         foreach ($stepsArray as $stepName) {
             if ($count < 8) {
                 $width = 100 / $count;
             } else {
                 $width = 100 / 8;
             }
             if ($i % 8 == 0) {
                 $path .= '</div><div class="col-sm-12 bs-wizard" style="border-bottom:0;">';
             }
             $style = 'style="width:' . $width . '%;float:left"';
             $req_id = "";
             $class2 = "";
             if ($CurrentOrder >= $i) {
                 $class = 'complete';
             } else {
                 if ($_REQUEST['id'] == "") {
                     $class2 = 'disabled';
                 }
                 $class = 'notcomplete';
             }
             $url_id = "";
             if ($_REQUEST['id'] != "" || $_REQUEST['table_id'] != "") {
                 if ($_REQUEST['id'] != "") {
                     $id_request = $_REQUEST['id'];
                     $url_id = "cmsMID=" . $_SESSION['cmsMID'] . "&id=" . $_REQUEST['id'] . "&gr_id_pg=" . $i;
                 } else {
                     $id_request = $_REQUEST['table_id'];
                 }
                 if ($i == 2) {
                     $req_id = "cmsMID=" . $_SESSION['cmsMID'] . "&id=" . $id_request . "&module_id=" . $id_request . "&gr_id_pg=" . $i;
                 } else {
                     $req_id = "cmsMID=" . $_SESSION['cmsMID'] . "&id=" . $id_request . "&table_id=" . $id_request . "&gr_id_pg=" . $i;
                 }
             }
             if (count($steps_pages) > 0) {
                 $pageLink = $steps_pages[$i] . "?{$req_id}";
             } else {
                 $pageLink = basename($_SERVER['PHP_SELF']) . "?" . $url_id;
             }
             $path .= '<div class=" bs-wizard-step ' . $class . ' ' . $class2 . '" ' . $style . '>
               <div class="text-center bs-wizard-stepnum">' . $this->getConstant("Step") . ": " . $this->getConstant($stepName) . '</div>
               <div class="progress"><div class="progress-bar"></div></div>
               <a href="' . $pageLink . '" class="bs-wizard-dot" data-group="' . $i . '"></a>
             </div>';
             $i++;
         }
         $path .= '</div></div>';
     } else {
         $utils = new utils();
         $groups = $fpdo->from("cms_fields_groups_page_builder")->where("module_id", $cms_id)->fetchAll();
         if ($_REQUEST['gr_id_pg'] == "") {
             $_REQUEST['gr_id_pg'] = $first_group;
         }
         $get_AllGroups = $utils->GetNotNullGroupsWithFields();
         // $AllGroupsArray = $get_AllGroups[2];
         $AllGroups = $get_AllGroups[0];
         $AllNotNullGroups = implode(',', $AllGroups);
         $groups_all = $fpdo->from("cms_fields_groups_page_builder")->where("module_id='{$cms_id}' and id in ({$AllNotNullGroups})")->fetchAll();
         $first_group = $groups_all[0]['id'];
         $count = count($groups_all);
         if ($count > 1) {
             $path = "<div class='row'>";
             $i = 0;
             $groupCounts = 1;
             $path .= '<div class="col-sm-12 bs-wizard" style="border-bottom:0;">';
             if ($_REQUEST['gr_id_pg'] == "") {
                 $group_id = $groups_all[0]['id'];
             } else {
                 $group_id = $_REQUEST['gr_id_pg'];
             }
             $CurrentOrder = $utils->lookupField("cms_fields_groups_page_builder", "id", "ord", $group_id);
             foreach ($groups_all as $row) {
                 if ($count < 8) {
                     $width = 100 / $count;
                 } else {
                     $width = 100 / 8;
                 }
                 if ($i % 8 == 0) {
                     $path .= '</div><div class="col-sm-12 bs-wizard" style="border-bottom:0;">';
                 }
                 $style = 'style="width:' . $width . '%;float:left"';
                 $req_id = "";
                 $class2 = "";
                 if ($CurrentOrder >= $row['ord']) {
                     $class = 'complete';
                 } else {
//.........这里部分代码省略.........
开发者ID:VoilaVoila,项目名称:voilacms,代码行数:101,代码来源:Utils.php

示例3: VoilaController

session_start();
error_reporting(0);
include_once "../config.php";
include_once 'controller/include.inc.php';
$voiControl = new VoilaController();
$utils = new utils();
$ob_roles = $voiControl->obRoles();
if ($_SESSION['go-cms'] == 'go') {
    $utils->redirect("views/home/home.php");
}
$error_msg = '';
if ($_REQUEST['action'] == 'login') {
    $username_req = $_REQUEST['username'];
    $password_req = md5($_REQUEST['password']);
    $username = $utils->lookupField('cms_users', 'username', 'username', $username_req);
    $password = $utils->lookupField('cms_users', 'password', 'password', $password_req);
    $login_result = $ob_roles->login($username_req, $password_req);
}
?>
<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>VOILA CMS | Log in</title>
    <!-- Tell the browser to be responsive to screen width -->
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <!-- Bootstrap 3.3.5 -->
    <link rel="stylesheet" href="includes/bootstrap/css/bootstrap.min.css">
    <!-- Font Awesome -->
开发者ID:VoilaVoila,项目名称:voilacms,代码行数:30,代码来源:index.php


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