Пример #1
0
 function getListEdit($main_item)
 {
     $obj_user = YiiUser::getInstance();
     $condition = "`level` >= 1 ";
     $items = $obj_user->getGroups($condition, 'id value, name text, level');
     $list['groupID'] = buildHtml::select($items, $main_item->groupID, "groupID", "", "size=10", "   ", "-");
     return $list;
 }
Пример #2
0
 function build($prefix_name = "params", $arr_size = array(5, 7))
 {
     $name = $prefix_name . "[" . $this->node['name'] . "]";
     $id = $prefix_name . "-" . $this->node['name'] . "-";
     if (strpos($this->node['attr'], "multiple")) {
         $name = $name . "[]";
     }
     $obj_module = YiiCategory::getInstance();
     $items = $obj_module->loadItems('id value, title text');
     $html = buildHtml::select($items, $this->value, "{$name}", "{$id}", $this->node['attr']);
     return '<div class="form-group row"> <div class="col-md-' . $arr_size[0] . '" title="' . $this->node['description'] . '">' . $this->node['label'] . '</div> ' . '<div class="col-md-' . $arr_size[1] . '">' . $html . '</div> ' . " </div>";
 }
Пример #3
0
 function getList()
 {
     $lists = array();
     $filter_state = Request::getVar('filter_state', -2);
     $filter_search = Request::getVar('filter_search', "");
     $filter_group = Request::getVar('filter_group', 0);
     $items = array();
     $items[] = array("value" => -2, "text" => "- Select state -");
     $items[] = array("value" => 0, "text" => "Unpublish");
     $items[] = array("value" => 1, "text" => "Publish");
     $items[] = array("value" => -1, "text" => "Block");
     $lists['filter_state'] = buildHtml::select($items, $filter_state, "filter_state", "filter_state", "onchange=\"document.adminForm.submit();\"");
     global $user;
     $obj_user = YiiUser::getInstance();
     $group = $obj_user->getGroup($user->groupID);
     $condition = "parentID > 0";
     if ($group->parentID != 1) {
         $condition = "`lft` >= {$group->lft} AND `rgt` <= {$group->rgt} ";
     }
     $groups = $obj_user->getGroups($condition, 'id value, name text, level');
     array_unshift($groups, array("value" => 0, 'text' => '-- Select group --'));
     $lists['filter_group'] = buildHtml::select($groups, $filter_group, "filter_group", "", "onchange=\"document.adminForm.submit();\"", "&nbsp;&nbsp;&nbsp;", "");
     return $lists;
 }
Пример #4
0
                                        </td>
                                        <td>
                                            <a href="<?php 
        echo $link_edit;
        ?>
"><?php 
        echo $item['title'];
        ?>
</a>
                                        </td>
                                        <td><?php 
        echo buildHtml::showBtnIcon("Items", $link_items, "mainmenu.png");
        ?>
</td>                                        
                                        <td align="center"><?php 
        echo buildHtml::status($i, $item['status']);
        ?>
</td>
                                        <td><?php 
        echo $item['description'];
        ?>
</td>
                                        <td><?php 
        echo $item['mdate'];
        ?>
</td>
                                        <td><?php 
        echo $item['id'];
        ?>
</td>
                                    </tr>                                    
Пример #5
0
 function getListEdit($main_item)
 {
     $cid = Request::getVar("cid", 0);
     $lists = array();
     $items = array();
     $obj_tblTournament = YiiTables::getInstance(TBL_GS_TOURNAMEMANTS);
     $obj_user = YiiUser::getInstance();
     $condition = "";
     if ($main_item->id != 0) {
         $condition = "(`lft` <" . $main_item->lft . " OR `lft` > " . $main_item->rgt . ")";
     }
     $results = $obj_tblTournament->loads('id value, name text, level', $condition, 'lft ASC', null);
     $items = array_merge($items, $results);
     $lists['parentID'] = buildHtml::select($items, $main_item->parentID, "parentID", "", "size=10", "&nbsp;&nbsp;&nbsp;", "-");
     $items = array();
     if ($main_item->id != 0) {
         $condition = "parentID = " . $main_item->parentID;
         $results = $obj_tblTournament->loads('id value, name text, level', $condition, 'lft ASC', null);
         $items = array_merge($items, $results);
         $lists['ordering'] = buildHtml::select($items, $cid, "ordering", "", "size=5");
     } else {
         $lists['ordering'] = "Ordering this item after save first";
     }
     return $lists;
 }
Пример #6
0
function showNodeTree($items, $items_status, $all_granted, $ext_default_1, $level = 0)
{
    $class = $level > 1 ? "line" : "";
    echo '<ul class="' . $class . '">';
    $k = 0;
    foreach ($items as $item) {
        $_class = $k == 0 ? "first" : ($k == count($items) - 1 ? "last" : "");
        $img_type = " <img src='/images/icons/affected_{$item->affected}.png' style='height: 16px;' />";
        $str_title = '';
        $link_edit = Router::buildLink('users', array("view" => "resource", "layout" => "edit", 'cid' => $item->id));
        $ck = -1;
        if (count($all_granted)) {
            if (isset($all_granted['allow'][$item->id])) {
                $ck = 1;
            } else {
                if (isset($all_granted['deny'][$item->id])) {
                    $ck = 0;
                }
            }
        }
        //        var_dump($ext_default_1); die;
        $_items_status = $items_status;
        if (in_array($item->app, $ext_default_1)) {
            $_items_status[0][2] = "success";
        }
        $btn = buildHtml::showBtnGroup('resource-' . $item->id, $_items_status, $ck);
        if ($item->status == 1) {
            $img_status = " <img src='/images/jassets/icons/tick.png' style='height: 16px;' />";
            $str_title = ' <a href="' . $link_edit . '">' . $item->title . '</a>' . $img_type . $img_status . $btn;
        } else {
            $img_status = " <img src='/images/jassets/icons/publish_x.png' style='height: 16px;' />";
            $str_title = ' <a href="' . $link_edit . '" style="text-decoration: line-through; color: #999;">' . $item->title . '</a>' . $img_type . $img_status . $btn;
        }
        if (isset($item->data_child) and count($item->data_child) > 0) {
            if ($level != 0) {
                echo '<li class="folder parent ' . $_class . '">';
                echo '<i class="folder-btn btn-open" rel=""></i>';
                echo $str_title;
            } else {
                echo '<li>';
                echo ' <a>' . $item->title . '</a>';
            }
            $level++;
            showNodeTree($item->data_child, $items_status, $all_granted, $ext_default_1, $level);
            echo '</li>';
        } else {
            echo '<li class="file ' . $_class . '">';
            echo $str_title;
            echo '</li>';
        }
        $k++;
    }
    echo '</ul>';
}
Пример #7
0
 public function getListEdit($mainItem)
 {
     $list = array();
     $obj_module = YiiCategory::getInstance();
     $items = $obj_module->loadItems('id value, name text', "scope = 'videos'");
     $list['category'] = buildHtml::select($items, $mainItem->catID, "catID", "", "size=7");
     $items = array();
     $items[] = array("value" => 0, "text" => "Unpublish");
     $items[] = array("value" => 1, "text" => "Publish");
     $items[] = array("value" => -1, "text" => "Hidden");
     $list['status'] = buildHtml::select($items, $mainItem->status, "status");
     $items = array();
     $items[] = array("value" => 0, "text" => "Disable");
     $items[] = array("value" => 1, "text" => "Enable");
     $list['feature'] = buildHtml::select($items, $mainItem->feature, "feature");
     return $list;
 }
Пример #8
0
</div>
                    </div>
                </div>
            </div>
            
            <div class="panel panel-info">
                <div class="panel-heading">
                    <span>Meta data</span>
                </div>
                <div class="panel-body">
                    <?php 
echo buildHtml::renderField('textarea', "metakey", $item->metakey, "Meta Key");
?>
 
                    <?php 
echo buildHtml::renderField('textarea', "metadesc", $item->metadesc, "Meta Desc");
?>
 
                </div> 
            </div> 
        </div> 
    </form>
</div>

<script>
    $(".selection-menu-select").change(function() {
        changeSelectMenu();
    });

    function changeSelectMenu() {
        var val = $(".selection-menu-select").val();
Пример #9
0
 static function renderField($type = "text", $name, $value = "", $title, $class = null, $placeholder = "", $w1 = 2, $w2 = 10, $width = "100%", $height = "400px")
 {
     if ($class == null) {
         $class = "form-control";
     }
     $html = '<div class="form-group row">';
     if ($type == "editor") {
         $html .= '<label class="control-label">' . $title . '</label>';
         $html .= '<div class="">';
         $html .= buildHtml::editors($name, $value, $width, $height);
         $html .= '</div>';
     } else {
         $html .= '<label class="control-label col-md-' . $w1 . '">' . $title . '</label>';
         $html .= '<div class="col-md-' . $w2 . '">';
         if ($type == "text") {
             $html .= '<input placeholder="' . $placeholder . '" type="text" name="' . $name . '" class="' . $class . '" value="' . $value . '">';
         } else {
             if ($type == "password") {
                 $html .= '<input placeholder="' . $placeholder . '" type="password" name="' . $name . '" class="' . $class . '" value="' . $value . '">';
             } else {
                 if ($type == "textarea") {
                     $html .= '<textarea rows="3" cols="20" name="' . $name . '" class="' . $class . '">' . $value . '</textarea>';
                 } else {
                     if ($type == "label") {
                         $html .= $value;
                     } else {
                         if ($type == "select") {
                             $html .= $value;
                         } else {
                             if ($type == "calander") {
                                 $html .= ' <div class="input-group date"> ' . '<input placeholder="' . $placeholder . '" type="text" name="' . $name . '" class="' . $class . ' datepicker" value="' . $value . '"> ' . ' <span class="input-group-addon"><span class="glyphicon glyphicon-calendar"></span></span> ' . '</div>';
                             }
                         }
                     }
                 }
             }
         }
         $html .= '</div>';
     }
     $html .= '</div>';
     return $html;
 }
Пример #10
0
"><?php 
    echo $item['title'];
    ?>
</a>  
                        <a  style="margin: 0px 0px 0px 10px; font-weight: bold; background: #eee; padding: 3px 5px;" 
                            target="_blank" href="<?php 
    echo $link_view;
    ?>
">Visit</a>
                    </td>
                    <td><?php 
    echo buildHtml::status($i, $item['status']);
    ?>
</td>
                    <td><?php 
    echo buildHtml::changState($i, $item['feature'], "feature.");
    ?>
</td>
                    <td>
                        <a href="<?php 
    echo $link_edit_cat;
    ?>
"><?php 
    echo $item['cat_name'];
    ?>
</a>                           
                    </td>
                    <td>
                        <a href="<?php 
    echo $link_created;
    ?>
Пример #11
0
 function getListEdit($mainitem)
 {
     $obj_category = YiiCategory::getInstance();
     $lists = array();
     $items = $obj_category->getScope();
     $lists['scopes'] = buildHtml::select($items, $mainitem->scope, "scope", "scope");
     return $lists;
 }
Пример #12
0
?>
                    <?php 
echo buildHtml::renderField("text", "params", $item->params, "Params", "field-verylong field-introduct");
?>
                    <?php 
echo buildHtml::renderField("text", "redirect_url", $item->redirect_url, "Redirect URL", "field-verylong field-introduct");
?>
                    <?php 
echo buildHtml::renderField("text", "redirect_msg", $item->redirect_msg, "Redirect Message", "field-verylong field-introduct");
?>
                    
                    <?php 
echo buildHtml::renderField("textarea", "description", $item->description, "Description", "field-long");
?>
                    <?php 
echo buildHtml::renderList("radio", "Published", "status", $lists['status'], $item->status, " ");
?>
                </div> 
                <div class="col-md-5">
                    <div class="node_introduct_fields">
                        <div class="node_introduct_field node_parentID">
                            <h2>Parent Node</h2>
                            Select a resource in this select box which will be the parent node of this resource.
                            <br>
                            This will help you to:
                            <br>
                            <ul>
                                <li>easier to organize your resources</li>
                                <li>Use the benefit of "Sticky" feature</li>
                            </ul>
                        </div>
Пример #13
0
 function getListEdit($main_item)
 {
     $cid = Request::getVar("cid", 0);
     $lists = array();
     $items = array();
     $obj_user = YiiUser::getInstance();
     $condition = "";
     if ($main_item->id != 0) {
         $condition = "(`lft` <" . $main_item->lft . " OR `lft` > " . $main_item->rgt . ")";
     }
     $results = $obj_user->getGroups($condition, 'id value, name text, level');
     $items = array_merge($items, $results);
     $lists['parentID'] = buildHtml::select($items, $main_item->parentID, "parentID", "", "size=10", "&nbsp;&nbsp;&nbsp;", "-");
     $items = array();
     if ($main_item->id != 0) {
         $condition = "parentID = " . $main_item->parentID;
         $results = $obj_user->getGroups($condition, 'id value, name text, level');
         $items = array_merge($items, $results);
         $lists['ordering'] = buildHtml::select($items, $cid, "ordering", "", "size=5");
     } else {
         $lists['ordering'] = "Ordering this item after save first";
     }
     $items_status = array();
     $items_status[] = array(-1, 'Default', 'danger');
     $items_status[] = array(1, 'Allow', 'success');
     $items_status[] = array(0, 'Deny', 'danger');
     $lists['item_status'] = $items_status;
     $table_ext = YiiTables::getInstance(TBL_EXTENSIONS);
     $lists['ext_default_1'] = $table_ext->loadColumn("name", "allowall = 1 ");
     return $lists;
 }
Пример #14
0
    ?>
" name="cid">
                            <?php 
    echo $item['title'];
    ?>
                    </td>
                    <td><?php 
    echo $item['type'];
    ?>
</td>
                    <td><?php 
    echo buildHtml::status($i, $item['status']);
    ?>
</td>
                    <td><?php 
    echo buildHtml::changState($i, $item['allowall'], 'allowall.');
    ?>
</td>
                    <td><?php 
    echo $item['version'];
    ?>
</td>
                    <td><?php 
    echo $item['creationDate'];
    ?>
</td>
                    <td><?php 
    echo $item['author'];
    ?>
</td>
                    <td><?php 
Пример #15
0
 function getListEdit($mainItem)
 {
     $moduleID = Request::getInt('cid', "");
     $lists = array();
     $obj_menu = YiiMenu::getInstance();
     $obj_module = YiiModule::getInstance();
     $items = $obj_menu->loadMenus();
     $items_xref = $obj_module->loadXrefMenu($moduleID);
     $attr = "";
     $meu_seletec = "selected";
     if ($mainItem->menu == "none") {
         $attr = 'disabled="disabled"';
     } else {
         if ($mainItem->menu == "all") {
             $attr = 'disabled="disabled"';
         }
     }
     $str_html = '<select id="selection-menu" class="inputbox" multiple="multiple" ' . $attr . ' size="15" name="selection-menu[]" style="min-width: 180px;">';
     foreach ($items as $item) {
         $str_html .= '<optgroup label="' . $item['title'] . '">';
         $_items = $item["_items"];
         foreach ($_items as $_item) {
             $str = str_repeat("&nbsp; &nbsp; ", $_item['level'] - 1);
             if ($mainItem->menu == "all") {
                 $str_html .= '<option value="' . $_item['id'] . '" selected ="">' . $str . $_item['title'] . '</option>';
             } else {
                 if ($mainItem->menu == "none") {
                     $str_html .= '<option value="' . $_item['id'] . '">' . $str . $_item['title'] . '</option>';
                 } else {
                     if (in_array($_item['id'], $items_xref)) {
                         $str_html .= '<option value="' . $_item['id'] . '" selected ="">' . $str . $_item['title'] . '</option>';
                     } else {
                         $str_html .= '<option value="' . $_item['id'] . '">' . $str . $_item['title'] . '</option>';
                     }
                 }
             }
         }
         $str_html .= '</optgroup>';
     }
     $str_html .= "</select>";
     $lists['selection-menu'] = $str_html;
     //                position
     $tbl_MP = YiiTables::getInstance(TBL_MODULE_POSITION);
     $items = $tbl_MP->loads("temp, position", null, " temp DESC");
     $str_html = '<div style="position: relative;">';
     $str_html .= '<select id="combobox-position" class="form-control" style="width: 180px; height: 25px;">' . "\r\n";
     $cur_temp = "";
     foreach ($items as $k => $item) {
         if ($cur_temp != $item['temp']) {
             if ($cur_temp != "") {
                 $str_html .= '</optgroup>' . "\r\n";
             }
             $str_html .= '<optgroup label="' . $item['temp'] . '">' . "\r\n";
             $cur_temp = $item['temp'];
         }
         if ($mainItem->position == $item['position']) {
             $str_html .= '<option value="' . $item['position'] . '" selected ="">' . $item['position'] . '</option>' . "\r\n";
         } else {
             $str_html .= '<option value="' . $item['position'] . '">' . $item['position'] . '</option>' . "\r\n";
         }
         if ($k == count($items) - 1) {
             $str_html .= '</optgroup>' . "\r\n";
         }
     }
     $str_html .= "</select>";
     $str_html .= '<input id="position" class="form-control" type="text" value="' . $mainItem->position . '" name="position" style="position: absolute; z-index: 1000; left: 0px; top: 0px; width: 162px; height: 25px; padding: 3px;">' . "\r\n";
     $str_html .= '</div>';
     $str_html .= '<script> $(window).ready(function($) {
                             $("#combobox-position").change(function(){
                                 var cur_pos = $("#combobox-position").val();
                                 $("#position").val(cur_pos);
                             });
                         });</script>';
     $lists['position'] = $str_html;
     $items = array();
     $items[] = array("value" => 0, "text" => "Unpublish");
     $items[] = array("value" => 1, "text" => "Publish");
     $items[] = array("value" => -1, "text" => "Hidden");
     $lists['status'] = buildHtml::select($items, $mainItem->status, "status");
     return $lists;
 }
Пример #16
0
?>
" alt="" id="image_src" style="height:190px;">
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            
            <div class="panel panel-info">
                <div class="panel-heading">
                    <span><b>Meta data</b></span>
                </div>
                <div class="panel-body">
                    <div class="panel-body">
                        <?php 
echo buildHtml::renderField("textarea", "metakey", $item->metakey, "Meta Key", null, "", 3, 9);
?>
   
                        <?php 
echo buildHtml::renderField("textarea", "metadesc", $item->metadesc, "Meta Desc", null, "", 3, 9);
?>
                    </div> 
                </div> 
            </div>
            
        </div>
    </form>
</div>

  
Пример #17
0
                </div>
                <div class="panel-body">
                    <?php 
echo buildHtml::renderField("calander", "cdate", $item->cdate, "Created", null, "", 3, 9);
?>
                    <?php 
echo buildHtml::renderField("label", "mdate", $item->mdate, "Modified", null, "", 3, 9);
?>
                    <?php 
echo buildHtml::renderField("label", "category", $list['category'], "Category", null, "", 3, 9);
?>
                    <?php 
echo buildHtml::renderField("label", "status", $list['status'], "Status", null, "", 3, 9);
?>
                    <?php 
echo buildHtml::renderField("label", "Feature", $list['feature'], "Feature", null, "", 3, 9);
?>
                     
                </div>
            </div>
            
            <div class="panel panel-info">
                <div class="panel-heading">
                    <span><b>Meta data</b></span>
                </div>
                <div class="panel-body">
                    <div class="panel-body">
                        <div class="form-group row">
                            <div class="col-md-3">Meta Key</div>
                            <div class="col-md-9">
                                <textarea name="metakey" rows="4" cols="30"><?php 
Пример #18
0
" alt="Media <?php 
        echo $item['title'];
        ?>
">
                                                        <span class="entry_time"><?php 
        echo $item['duration'];
        ?>
</span>
                                                    </a>
                                                </div>
                                                <div class="media-body entry-thunb">
                                                    <span class="media-heading"><a href="<?php 
        echo $item['link'];
        ?>
"><?php 
        echo buildHtml::truncateText($item['title'], 40);
        ?>
</a></span>
                                                    <span class="entry-control">
                                                        <span><i class="fa fa-thumbs-o-up"></i> <?php 
        echo $item['like'];
        ?>
</span>
                                                        <span><i class="fa fa-play-circle-o"></i> <?php 
        echo $item['viewed'];
        ?>
</span>
                                                    </span>
                                                    <div class="entry-social">
                                                        <div class="fb-like" data-href="<?php 
        echo $item['link'];
Пример #19
0
                        <div class="col-md-9"> 
                            <input <?php 
if (isset($item->params->app) and $item->params->app !== "System" or strtolower($item->type) == "separator") {
    echo 'readonly="true"';
}
?>
 id='field_link' type="text" name="link" class="form-control" value="<?php 
echo $item->link;
?>
">
                        </div>
                    </div>
                    <div class="form-group row">
                        <label class="control-label left col-md-3">Status</label>
                        <div class="col-md-9"><?php 
echo buildHtml::choseStatus("status", $item->status);
?>
</div>
                    </div>
                    <div class="form-group row">
                        <label class="control-label left col-md-3">Parent Item</label>
                        <div class="col-md-9"><?php 
echo $list['parentID'];
?>
</div>
                    </div>
                    <div class="form-group row">
                        <label class="control-label left col-md-3">Ordering</label>
                        <div class="col-md-9"><?php 
echo $list['ordering'];
?>
Пример #20
0
 function getListEdit($main_item)
 {
     global $user;
     $modelGroup = new Group();
     $obj_user = YiiUser::getInstance();
     $group = $modelGroup->getItem($user->groupID);
     $condition = "";
     if ($group->parentID != 1) {
         $condition = "`lft` >= {$group->lft} AND `rgt` <= {$group->rgt} ";
     }
     $items = $obj_user->getGroups($condition, 'id value, name text, level');
     $lists['groupID'] = buildHtml::select($items, $main_item->groupID, "groupID", "", "size=10", "&nbsp;&nbsp;&nbsp;", "-");
     $items = array();
     $items[] = array("value" => -2, "text" => "- Select status -");
     $items[] = array("value" => 0, "text" => "Unpublish");
     $items[] = array("value" => 1, "text" => "Publish");
     $items[] = array("value" => -1, "text" => "Block");
     $lists['status'] = buildHtml::select($items, $main_item->status, "status", "status");
     $items_status = array();
     $items_status[] = array(-1, 'Default', 'danger');
     $items_status[] = array(1, 'Allow', 'success');
     $items_status[] = array(0, 'Deny', 'danger');
     $lists['item_status'] = $items_status;
     $table_ext = YiiTables::getInstance(TBL_EXTENSIONS);
     $lists['ext_default_1'] = $table_ext->loadColumn("name", "allowall = 1 ");
     return $lists;
 }
Пример #21
0
    echo 'checked=""';
}
?>
 /> No
                        </div>
                    </div>
                    <?php 
echo buildHtml::renderField("label", "position", $lists['position'], "Position", null, "", 3, 9);
?>
                    
                    <?php 
echo buildHtml::renderField("label", "status", $lists['status'], "Status", null, "", 3, 9);
?>
                    
                    <?php 
echo buildHtml::renderField('label', "introtext", $item->description, "Description", null, "", 3, 9);
?>
                    
                </div>
            </div>
            <div class="panel panel-info">
                <div class="panel-heading">
                    <span><b>Menu Assignment</b></span>
                </div>
                <div class="panel-body">                
                    <div class="form-group row">
                        <div class="col-md-4">Menus</div>
                        <div class="col-md-8">
                            <select name="selection-menu-select" class="selection-menu-select">
                                <option value="all" <?php 
if ($item->menu == "all") {
Пример #22
0
 function getListEdit($main_item)
 {
     $cid = Request::getVar("cid", 0);
     $menuID = Request::getInt('menu', "");
     $list = array();
     $items[] = array("value" => "-1", "text" => "-- Select Menu --");
     $obj_menu = YiiMenu::getInstance();
     $results = $obj_menu->loadMenus('id value, title text', false);
     $items = array_merge($items, $results);
     $list['menuID'] = buildHtml::select($items, $menuID, "menuID");
     $condition = null;
     if ($main_item->id != 0) {
         $items = array();
         $condition = "parentID = " . $main_item->parentID;
         $results = $obj_menu->loadItems($menuID, 'id value, title text, level', $condition);
         $items = array_merge($items, $results);
         $list['ordering'] = buildHtml::select($items, $cid, "ordering", "", "size=5");
         $condition = "(`lft` <" . $main_item->lft . " OR `lft` > " . $main_item->rgt . ")";
     } else {
         $list['ordering'] = " New Menu Items default to the last position. Ordering can be changed after this Menu Item is saved.";
     }
     $items = array();
     $items[] = array("value" => "1", "text" => "Top", "level" => 0);
     $results = $obj_menu->loadItems($menuID, 'id value, title text, level', $condition);
     $items = array_merge($items, $results);
     $list['parentID'] = buildHtml::select($items, $main_item->parentID, "parentID", "", "size=10", "&nbsp;&nbsp;&nbsp;", "-");
     // danh sach app
     $obj_ext = YiiTables::getInstance(TBL_EXTENSIONS);
     $list['apps'] = $obj_ext->loads("*", "type = 'app'", "ordering ASC");
     foreach ($list['apps'] as $k => $app) {
         if (!is_dir(PATH_APPS_FRONT . "/" . $app['folder'])) {
             unset($list['apps'][$k]);
             continue;
         }
         $file_xml = PATH_APPS_FRONT . "/" . $app['folder'] . "/" . $app['folder'] . ".xml";
         if (!file_exists($file_xml)) {
             YiiMessage::raseSuccess("Invalid xml: " . $app['folder']);
             break;
         }
         $xml = simplexml_load_file($file_xml);
         $views = array();
         foreach ($xml->views->view as $view) {
             $obj_view = new stdClass();
             $obj_view->name = (string) $view->attributes()->name;
             $obj_view->title = (string) $view->attributes()->title;
             $obj_view->desc = (string) $view->attributes()->desc;
             if ($view->layouts) {
                 $obj_view->layouts = array();
                 foreach ($view->layouts->layout as $layout) {
                     $obj_layout = new stdClass();
                     $obj_layout->value = (string) $layout->attributes()->value;
                     $obj_layout->desc = (string) $layout->attributes()->desc;
                     $obj_layout->title = (string) $layout;
                     $obj_view->layouts[] = $obj_layout;
                 }
             }
             $views[] = $obj_view;
         }
         $app['views'] = $views;
         $list['apps'][$k] = $app;
     }
     $app = array();
     $app['name'] = "System";
     $app['title'] = "System Link";
     $app['views'] = array();
     $obj_view = new stdClass();
     $obj_view->name = "ExternalURL";
     $obj_view->title = "External URL";
     $obj_view->desc = "An external or internal URL.";
     $app['views'][] = $obj_view;
     $obj_view = new stdClass();
     $obj_view->name = "MenuItemAlias";
     $obj_view->title = "Menu Item Alias";
     $obj_view->desc = "Create an alias to another menu item.";
     $app['views'][] = $obj_view;
     $obj_view = new stdClass();
     $obj_view->name = "Separator";
     $obj_view->title = "Separator";
     $obj_view->desc = "Separator, Only title";
     $app['views'][] = $obj_view;
     $list['apps'][] = $app;
     return $list;
 }
Пример #23
0
                </div> 

                <div class="row">
                    <div class="col-md-6">
                        <div class="panel">
                            <div class="panel-heading">
                                <span><b>SEF</b></span>                            
                            </div>
                            <div class="panel-body">
                                <?php 
echo buildHtml::renderList("radio", "Enable sef", "config[site][sef]", array(array(1, 'Yes'), array(0, 'No')), $this->detectConfig('frontend', 'sef', 'params'), null, 4, 8);
?>
                                <?php 
echo buildHtml::renderList("radio", "Use url suffix", "config[site][sef_suffix]", array(array(1, 'Yes'), array(0, 'No')), $this->detectConfig('frontend', 'sef_suffix', 'params'), null, 4, 8);
?>
                                
                                <?php 
echo buildHtml::renderField("text", "config[site][sef_urlsuffix]", $this->detectConfig('frontend', 'sef_urlsuffix', 'params'), "url suffix", null, "", 4, 8);
?>
                            </div>
                        </div>
                    </div>
                </div> 
            </div>


        </div>
    </div>
</form>