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


PHP field::SetTypeField方法代码示例

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


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

示例1: getForm

 public function getForm($action)
 {
     global $allGroupAvilable;
     global $pageList;
     global $module_id;
     $res = "";
     $res .= "<div class='box box-danger form-horizontal'><div class='box-body'>";
     if ($this->steps == true) {
         $res .= $this->create_gen_path($_SESSION['cmsMID'], $this->stepsArray, $this->stepsPages);
     }
     if ($this->AsForm == true) {
         $res .= "<form method='post' class='{$this->cssForm}' name='{$this->nameForm}' id='{$this->idForm}'><input type='hidden' name='backLink' value='" . $_SERVER['HTTP_REFERER'] . "'>";
     }
     $res .= "<div class='Form-Field form-generate-voila {$this->cssForm}'>";
     $countColumns = 0;
     if ($this->countCell > 0) {
         $countColumns = round(count($this->columns) / $this->countCell);
         $res .= "<div class='{$this->cellClassWithCount}'>";
     }
     $i = 0;
     $classSubmit = "";
     $dataObjectForPageBuilder = "";
     foreach ($this->columns as $column) {
         if ($this->types[$column] == "pageBuilder") {
             $classSubmit = "SubmitPageBuilder";
             $currentGroup = $_REQUEST['gr_id_pg'];
             $dataObjectForPageBuilder = " data-cuuenr-file='" . basename($_SERVER["PHP_SELF"]) . "' data-cms-id='{$module_id}' data-avilable-groups='{$allGroupAvilable}' data-current-page='{$currentGroup}' data-list-page='{$pageList}' ";
         }
         if (!$countColumns) {
             $res .= "<div class='{$this->ClassMain}'>";
         }
         if ($countColumns > 0) {
             if (fmod($i, $countColumns) == 0 && $i != 0) {
                 $res .= "</div><div class='{$this->cellClassWithCount}'>";
             }
         }
         $i++;
         $res .= "<div class='form-group'>";
         $span = "";
         if ($this->requireds[$column] == 'required' || in_array($column, $this->requireds)) {
             $span = "<span class='red  required' >* </span>";
         } else {
             $span = "<span class=' req'>&nbsp; </span>";
         }
         $SubMainClass = $this->SubMain[0];
         $SubMainClass2 = $this->SubMain[2];
         $labelClass = "control-label";
         if ($this->types[$column] == "pageBuilder") {
             $SubMainClass = $SubMainClass2 = "col-sm-12";
             $labelClass = "";
         } else {
             if ($this->LangEffected[$column] != "") {
                 $lang_org = str_replace($this->LangEffected[$column] . "_", "", $column);
                 $orgin_col = str_replace("_" . $lang_org, "", $column);
                 $res .= "<label class='" . $SubMainClass . " {$labelClass}'>" . $span . $this->getConstant($orgin_col, $this->constants[$orgin_col]) . " (" . $this->getConstant($lang_org) . ")" . ": </label>";
             } else {
                 $res .= "<label class='" . $SubMainClass . " {$labelClass}'>" . $span . $this->getConstant($column, $this->constants[$column]) . ": </label>";
             }
         }
         $field_ob = new field();
         if ($this->types[$column] == 'map') {
             $field_ob->setMap($this->values[$column]);
         }
         $field_ob->SetIdField($column);
         $field_ob->SetNameField($column);
         $field_ob->SetCssClass($this->classes[$column] . " form-control");
         $field_ob->SetValueField($this->values[$column]);
         $field_ob->SetTypeField($this->types[$column]);
         $field_ob->SetTable($this->extendTables[$column][0]);
         $field_ob->SetTname($this->extendTables[$column][1]);
         $field_ob->SetTvalue($this->extendTables[$column][2]);
         $field_ob->setWhere($this->extendTables[$column][3]);
         $field_ob->SetRequiredField($this->requireds[$column]);
         if (!$this->extendTables[$column][4]) {
             $this->extendTables[$column][4] = true;
         }
         $field_ob->setWithAdd($this->extendTables[$column][4]);
         $field_ob->SetExtra($this->extra[$column]);
         $field_ob->SetInputLength($this->legths[$column]);
         $res .= "<div class='" . $SubMainClass2 . "'>";
         $res .= $field_ob->getField();
         $res .= "<small class='field-description'>" . $this->FieldDescription[$column] . "</small>";
         $res .= "</div></div>";
         // echo $this->tableName;
         //    global $fpdo;
         //  $get_description= $fpdo->from('cms_module_fields')->where("table_id='".$_SESSION['cmsMID']."'")->fetch();
         //  echo $get_description['description'];
         $res .= "<div class='hr'><hr></div>";
         if (!$countColumns) {
             $res .= "</div>";
         }
     }
     if ($this->countCell) {
         $res .= "</div>";
     }
     $res .= $this->AppendToForm;
     $res .= "  <div class='col-sm-12'>";
     $res .= "   <input type='hidden' value='{$action}' name='action' id='action'>";
     if ($this->backBtn == true) {
         $res .= $this->back($this->backLink);
//.........这里部分代码省略.........
开发者ID:VoilaVoila,项目名称:voilacms,代码行数:101,代码来源:GenerateFormField.php

示例2: constant

                                </td>
                            </tr>


                            <tr>
                                <td colspan="4">
                                    <div class="form-group"><label class="col-xs-3 control-label"><span class="red  required"> </span><?php 
echo $utils->getConstant("sortable");
?>
: </label>
                                        <div class="col-sm-9">
                                            <?php 
$field_ob3 = new field();
$field_ob3->SetIdField('sortable');
$field_ob3->SetNameField('sortable');
$field_ob3->SetTypeField('select');
$field_ob3->SetTable();
$field_ob3->SetCssClass("form-control");
$field_ob3->setWhere();
$field_ob3->SetExtra($extra_sortable);
echo $field_ob3->getField();
?>
                                         <small class="field-description"><?php 
echo constant("sortable_desc");
?>
</small>   
                                        </div></div>
                                </td>
                            </tr>
                            <tr>
                                <td>
开发者ID:VoilaVoila,项目名称:voilacms,代码行数:31,代码来源:AddField.php

示例3: GetList

   public function GetList($parent = '', $value = '')
   {
       if ($parent == '') {
           $parent = $this->field_Parent;
       }
       if ($value == '') {
           $value = $this->parentValue;
       }
       $columns = implode(',', $this->columns);
       $this->where[$this->field_Parent] = $value;
       $list = $this->fpdo->from($this->table)->select($columns)->where($this->where)->orderBy($this->order)->fetchAll();
       $result = "";
       if (count($list) > 0) {
           $result .= '<ol class="dd-list" data-id="' . $value . '">' . "\r\n";
           foreach ($list as $row) {
               $bool = false;
               $result .= '<li class="dd-item dd3-item" data-id="' . $row[$this->field_id] . '">' . "\r\n";
               $result .= '<div class="dd-handle dd3-handle"></div>' . '<div class="dd3-content form-inline">';
               if ($this->checkEditParmeters($row)) {
                   $result .= "<form method='post' action='" . basename($_SERVER['PHP_SELF']) . "'>";
               }
               $result .= "<div class='left-item'>";
               $arrayCols = array();
               $editLink = basename($_SERVER['PHP_SELF']) . "?action=_edit";
               foreach ($this->columns as $col) {
                   if ($col != $this->field_id && $col != $this->field_Parent && $col != $this->field_active && $col != $this->field_static) {
                       $column = "<label>" . $row[$col] . "</label>";
                       if ($_REQUEST['action'] == '_edit') {
                           if ($this->checkEditParmeters($row)) {
                               $field_ob = new field();
                               $field_ob->SetIdField($col);
                               $field_ob->SetNameField($col);
                               $field_ob->SetValueField($row[$col]);
                               $field_ob->SetTypeField($this->types[$col]);
                               $field_ob->SetCssClass($this->cssClass[$col]);
                               $field_ob->SetTable($this->source[$col][0]);
                               $field_ob->SetTname($this->source[$col][1]);
                               $field_ob->SetTvalue($this->source[$col][2]);
                               $field_ob->setWhere($this->source[$col][3]);
                               $column = $field_ob->getField();
                           }
                       }
                       array_push($arrayCols, "<div class='form-group'><label class='red'><strong class='red'>" . $this->getConstant($col) . ":</strong></label> " . $column . "</div>");
                   }
               }
               foreach ($this->editParameters as $parmeter) {
                   $editLink .= "&" . $parmeter . "=" . $row[$parmeter];
               }
               $arrayCols[0] = "<b>" . $arrayCols[0] . "</b>";
               $result .= implode(" &nbsp; ", $arrayCols);
               $result .= "</div>";
               $result .= "<div class='second-item'>";
               if ($this->checkEditParmeters($row)) {
                   foreach ($this->editParameters as $parameter) {
                       $result .= "<input type='hidden' value='" . $_REQUEST[$parameter] . "' name='{$parameter}'>";
                   }
                   $result .= "<input type='hidden' value='Edit' name='action'>";
                   $result .= "<button type='submit' class='btn-e-r btn btn-danger btn-sm'>" . $this->icons->ico['save'] . "</button>";
               } else {
                   if ($this->delete) {
                       $result .= "<div class='right-item'><input type='checkbox' value='" . $row[$this->field_id] . "' name='DeleteRow[]' class='checkbox'></div>\n";
                   }
                   $result .= '<div class="dropdown nestable-dropdown">
 <button class="btn-option dropdown-toggle" type="button" id="dropdownMenu1" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
   <i class="glyphicon glyphicon-cog"></i></button>
 <ul class="dropdown-menu" aria-labelledby="dropdownMenu1">';
                   if ($this->edit != "") {
                       $result .= "<li><a href='{$editLink}'>" . $this->icons->ico['edit'] . " " . $this->getConstant("Edit") . "</a></li>";
                   }
                   if ($this->static == true) {
                       $result .= "<div class='right-item'>" . _Static . "</div>";
                   }
                   if ($this->active == true) {
                       $result .= "<li>" . $this->switcher($this->table, $row[$this->field_id], $this->field_active, $row[$this->field_active], "SwitcherV", $this->field_id, "Active") . "</li>";
                   }
                   foreach ($this->extraflag as $flag) {
                       $result .= "<li>" . $this->switcher($this->table, $row[$this->field_id], $flag, $row[$flag], "SwitcherV", $this->field_id, $flag) . "</li>";
                   }
                   $result .= ' </ul>
                </div>';
               }
               $result .= "</div>";
               if ($this->checkEditParmeters($row)) {
                   $result .= "</form>";
               }
               $result .= "</div>";
               $result .= $this->GetList($this->field_Parent, $row[$this->field_id]);
               $result .= '</li>' . "\r\n";
           }
           $result .= '</ol> ' . "\r\n";
           return $result;
       } else {
           return false;
       }
   }
开发者ID:VoilaVoila,项目名称:voilacms,代码行数:95,代码来源:Nestable.php

示例4: foreach

file_put_contents("dd", json_encode($moduleDynamic) . "\r\n");
$fileds = $fpdo->from('cms_module_fields')->where("table_id='" . $moduleDynamic['id'] . "' and is_main='1'")->fetch();
file_put_contents("dd", json_encode($fileds) . "\r\n", FILE_APPEND);
/*
  if ($type === 'checkbox') {
  $module = $this->fpdo->from('cms_modules')->where('id', $_SESSION['cmsMID'])->fetch();
  $table = $module['table_name'];
  $langType = $module['lang_type'];
  $fileds = $this->fpdo->from('cms_module_fields')->where("table_id='" . $_SESSION['cmsMID'] . "' and plus !='' and type='checkbox'")->fetch();
  foreach ()
  } */
if ($action == 'edit') {
    $field_ob = new field();
    $field_ob->SetIdField($field);
    $field_ob->SetNameField($field);
    $field_ob->SetTypeField($type == "DynamicSelect" ? "select" : $type);
    $field_ob->SetTable($t_table);
    $field_ob->SetCssClass("form-control input-sm");
    // $field_ob->SetRequiredField($this->requireds[$col]);
    $field_ob->SetTname($t_name);
    $field_ob->SetTvalue($t_value);
    $field_ob->SetValueField($extra_value);
    $field_ob->setWhere();
    if ($extra_table == "") {
        $field_ob->SetExtra(array($extra_id));
    }
    if ($laneffected[$field] != "") {
        $lang_org = str_replace($laneffected[$field] . "_", "", $field);
        $orgin_col = str_replace("_" . $lang_org, "", $field);
        $field_cons = $utils->getConstant($orgin_col, "") . " (" . $utils->getConstant($lang_org) . ")";
    } else {
开发者ID:VoilaVoila,项目名称:voilacms,代码行数:31,代码来源:InlineEditing.php

示例5: array

 $operations .= "<div class='row'><div class='col-sm-6'><table class='table table-striped table-bordered table-hover' style='margin-top:10px'> <tbody>" . "<tr><td colspan='3' class='danger'><label>" . $utils->getConstant("conditions") . "</label></td></tr>";
 $dateTypeArray = array("date", "datepicker");
 $sortingField = "";
 foreach ($queryFieldModule as $field) {
     $sortingField .= "<option value='" . $field['title'] . "'>" . $field['title'] . "</option>";
     $dataModule = "";
     $options = "<option value='='>=</option>" . "<option value='>'>></option>" . "<option value='>='>>=</option>" . "<option value='<'><</option>" . "<option value='<='><=</option>" . "<option value='!='>!=</option>" . "<option value='LIKE'>LIKE</option>" . "<option value='LIKEPER'>LIKE %...%</option>" . "<option value='NOTLIKE'>NOT LIKE</option>" . "<option value='IN'>IN(...)</option>" . "<option value='NOTIN'>NOT IN(...)</option>" . "<option value='ISNULL'>IS NULL</option>" . "<option value='ISNOTNULL'>IS NOT NULL</option>";
     if (in_array($field['type'], $dateTypeArray)) {
         $input = "<div class='input-group date date-widget' ><input type='text' class='form-control valueOperation' data-id='" . $field["id"] . "' />" . "<span class='input-group-addon'>\n                        <span class='glyphicon glyphicon-calendar'></span>\n                    </span></div>" . "";
         $options = "<option value='='>=</option>" . "<option value='>'>></option>" . "<option value='>='>>=</option>" . "<option value='<'><</option>" . "<option value='<='><=</option>" . "<option value='!='>!=</option>" . "<option value='ISNULL'>IS NULL</option>" . "<option value='ISNOTNULL'>IS NOT NULL</option>";
     } elseif ($field['type'] == "DynamicSelect") {
         $field_ob = new field();
         $field_ob->SetIdField();
         $field_ob->SetNameField();
         $field_ob->SetCssClass("valueOperation form-control");
         $field_ob->SetTypeField($field['type']);
         $plus = explode(',', $field['plus']);
         $field_ob->SetExtra($plus);
         $field_ob->setWithObjectsExtra(true);
         $field_ob->setDataObjects(array("id" => $field["id"]));
         $res = $field_ob->getField();
         $dataModule = "data-module='" . $plus[0] . "'";
         $input = "<div class='input-group' style='width:100%' >{$res}</div>";
         $options = "<option value='='>=</option>" . "<option value='!='>!=</option>" . "<option value='IN'>IN(...)</option>" . "<option value='NOTIN'>NOT IN(...)</option>" . "<option value='ISNULL'>IS NULL</option>" . "<option value='ISNOTNULL'>IS NOT NULL</option>";
     } else {
         $input = "<div class='input-group' style='width:100%' ><input type='text' class='form-control valueOperation' data-id='" . $field["id"] . "' ></div>";
     }
     $operations .= "<tr>" . "<td><label>" . $utils->getConstant($field["title"]) . "</label></td>" . "<td><select data-field='" . $field["title"] . "' {$dataModule} data-type='" . $field['type'] . "' class='operation form-control' style='min-width:150px;' data-id='" . $field["id"] . "'>" . $options . "</select></td>" . "<td>{$input}</td>" . "</tr>";
 }
 $operations .= "</tbody></table></div><div class='col-sm-6'><table class='table table-striped table-bordered table-hover' style='margin-top:10px'><tbody><tr><tr><td colspan='3' class='danger'><label>" . $utils->getConstant("sorting") . "</label></td></tr>";
 $operations .= "" . "<td><label>" . $utils->getConstant("OrderBy") . "</label></td>" . "<td colspan='2'><select class='form-control' id='WidgetSortBy'><option value=''>---------------------</option><option value='id'>id</option>{$sortingField}</select></td>" . "</tr>";
开发者ID:VoilaVoila,项目名称:voilacms,代码行数:31,代码来源:getOperationForWidgetForPageBuilder.php

示例6: GetListTable


//.........这里部分代码省略.........
         }
         if ($this->widget == true) {
             $result .= "<th width=30 align='center'>" . widget . "</th>\n";
         }
         if ($this->view_page == true) {
             $result .= "<th width=30 align='center'>" . view . "</th>\n";
         }
         if ($this->edit != '') {
             $result .= "<th width=30 align='center'>" . edit . "</th>\n";
         }
         if ($this->delete == true) {
             $result .= "<th width=30><input type='checkbox' id='SelectAll'></th>\n";
         }
         $result .= "</tr>\n";
         $result .= "</thead>\n";
         $result .= "<tbody id='{$soratble}' class='sortable ui-sortable'>\n";
         $m = 1;
         if ($_REQUEST['action'] == 'add' && $this->isGridList == true) {
             if (count($this->types) > 0) {
                 $result .= "<tr>";
                 $result .= $this->getParametersToPassIt(true);
                 $result .= $this->getParametersToPassIt();
                 foreach ($this->columns as $col) {
                     $field_ob = new field();
                     $field_ob->SetIdField($col);
                     $field_ob->SetNameField($col);
                     $field_ob->SetCssClass($this->classes[$col]);
                     $required = $this->requireds[$col];
                     if ($required == "" && in_array($col, $this->requireds)) {
                         $required = "required";
                     }
                     $field_ob->SetRequiredField($required);
                     $field_ob->SetValueField($this->source[$col][3]);
                     $field_ob->SetTypeField($this->types[$col]);
                     $field_ob->SetTable($this->extendTables[$col][0]);
                     $field_ob->SetTname($this->extendTables[$col][1]);
                     $field_ob->SetTvalue($this->extendTables[$col][2]);
                     $field_ob->setWhere($this->extendTables[$col][3]);
                     $field_ob->WithLabel(false);
                     if (!$this->extendTables[$col][4]) {
                         $this->extendTables[$col][4] = true;
                     }
                     if (in_array($col, $this->parentAttr)) {
                         $field_ob->SetValueField($_REQUEST[$col]);
                     }
                     $field_ob->setWithAdd($this->extendTables[$col][4]);
                     $field_ob->SetExtra($this->extra[$col]);
                     $field_ob->SetInputLength($this->legths[$col]);
                     $result .= "<td>" . $field_ob->getField() . "</td>";
                 }
                 foreach ($this->extraLinks as $exlink) {
                     $result .= "<td></td>\n";
                 }
                 if ($this->active == true) {
                     $result .= "<td></td>\n";
                 }
                 $i_page = 0;
                 foreach ($query as $row_seo) {
                     if ($i_page < 1) {
                         if ($row_seo[$this->page_id] > 0) {
                             $result .= "<td></td>\n";
                             $i_page++;
                         }
                     }
                 }
                 $i_dublicate = 0;
开发者ID:VoilaVoila,项目名称:voilacms,代码行数:67,代码来源:ListTable.php

示例7: field

<?php

include "../../common/top_ajax.php";
$field_ob = new field();
$field_ob->SetIdField("SelectWidget");
$field_ob->SetNameField("SelectWidget");
$field_ob->SetCssClass(" form-control");
$field_ob->SetValueField();
$field_ob->SetTypeField("select");
$field_ob->SetTable("cms_widgets");
$field_ob->SetTname("title");
$field_ob->SetTvalue("id");
$field_ob->setWhere("");
$field_ob->SetRequiredField("");
echo $res = $field_ob->getField();
开发者ID:VoilaVoila,项目名称:voilacms,代码行数:15,代码来源:getListWidgetforPageBuilder.php


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