Esempio n. 1
0
 public function Form()
 {
     if ($this->setting['title'] == null) {
         $title = _lg('Link generator');
     } else {
         $title = $this->setting['title'];
     }
     if ($this->setting['type'] == null) {
         $type = null;
     } else {
         $type = $this->setting['type'];
     }
     if ($this->setting['id'] == null) {
         $id = null;
     } else {
         $id = $this->setting['id'];
     }
     //        $result = 'title:<input type="text" name="title"  value="' . $title . '" />';
     //        $result .= 'type:<select>'
     //                . '<option value="0" > category </option‌>'
     //                . '<option value="1" > tag </option‌>'
     //                . '<option value="2" > topic </option‌>'
     //                . '</select>';
     //        $result .= 'id:<input type="text" id="autocomp"  />';
     //        $result .= '<input type="hidden" name="id"  value="' . $id . '"  />';
     //        $result .= 'id:<input type="submit" value="save"  />';
     $form = new TForm();
     $form->AddField('select', 'title', $type, array('name' => 'type'), array(0 => array('0', 'category'), 1 => array('1', 'tag'), 2 => array('2', 'topic')));
     $form->AddField('text', 'title', $title, array('class' => 'autocomplete', 'name' => 'title'));
     $form->AddField('hidden', '', $id, array('name' => 'id', 'class' => 'hidden'));
     $form->AddField('submit', '', _lg('save'));
     return $form->FormBody();
 }
 public static function Loader()
 {
     global $side_menu;
     $index = $side_menu->AddItem(_lg('Managers'), '#', 0, 'fa-user');
     $side_menu->AddItem(_lg('Managers list'), UR_MP . 'Manager', $index);
     $side_menu->AddItem(_lg('New Manager'), UR_MP . 'Manager/NewManager', $index);
 }
Esempio n. 3
0
 public function Form()
 {
     $form = new TForm();
     if ($this->setting['title'] == null) {
         $title = _lg('Simple Text widget title');
     } else {
         $title = $this->setting['title'];
     }
     $form->AddField('text', _lg('title'), $title, array('name' => 'title'));
     $form->AddField('submit', '', _lg('send'));
     $result = $form->FormBody();
     return $result;
 }
Esempio n. 4
0
 public function Insert()
 {
     $cls = $_POST['class'];
     require './../upload/widget/' . $cls . '.php';
     $class = new $cls(WIDGET_TEMPLATE_MODE);
     $data['type'] = 'sis';
     $data['widget_class'] = $cls;
     $data['widget_type'] = $_POST['type'];
     $data['widget_setting'] = serialize($class->GetSetting());
     $result['success'] = FALSE;
     $result['value'] = _lg('can\'t insert widget');
     $id = $this->model->Create($data);
     if ((int) $id > 0) {
         $this->view->class = $cls;
         $this->view->PageRender('Widget/NewWidget', self::$_main_title, FALSE);
         $result['success'] = TRUE;
         $result['value'] = str_replace('%id%', $id, $this->view->new_widget);
     }
     echo json_encode($result);
     //
 }
Esempio n. 5
0
?>
 
        </title>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">

        <?php 
// load js libs
$public_libs = new TPublicLibrary();
$public_libs->LoadPublicLibs();
// style sheet
$public_libs->LoadExtedentLib();
//        $public_libs->LoadTemplateCMCSS(array('style', 'object', 'byekan'));
// load js
$public_libs->LoadCMJS(array('general', 'side-menu', 'jquery.pin', 'jquery.nicescroll.min'));
if (_lg("DIR") == "rtl") {
    $public_libs->LoadCMCSS(array('general-rtl', 'element-rtl', 'byekan'));
}
// pakage load
$public_libs->LoadPackageJS(array('ckeditor/ckeditor', 'jquery-ui/jquery-ui.min', 'tagsinput/jquery.tagsinput', 'sortable/jquery-sortable-min', 'chart/Chart', 'datepicker/js/zebra_datepicker', 'datepicker/js/persianDatepicker.min'));
$public_libs->LoadPackageCSS(array('jquery-ui/jquery-ui.min', 'tagsinput/jquery.tagsinput', 'datepicker/css/persianDatepicker-default', 'datepicker/css/default'));
?>


    </head>
    <body>
        <div>
            <section id="header">

                <div id="logo"></div>
Esempio n. 6
0
 public static function Loader()
 {
     global $side_menu;
     $index = $side_menu->AddItem(_lg('Topics'), '#', 0, 'fa-bullhorn', -112);
     $side_menu->AddItem(_lg("Topics list"), UR_MP . 'Topic', $index);
     $side_menu->AddItem(_lg("New Topic"), UR_MP . 'Topic/NewTopic', $index);
 }
Esempio n. 7
0
 /**
  * add notifcation
  * @param mixed $array_check array of argumans
  */
 public function _notifiControl()
 {
     return FALSE;
     if (isset($array_check[0])) {
         if ($array_check[0] == 'delete') {
             TNotification::Add(self::$_main_title . _lg(" has been delete"), 'success');
         } elseif ($array_check[0] == 'do') {
             TNotification::Add(_lg("Bulk action do successfully"), 'success');
         }
     }
     if (isset($array_check[1])) {
         if ($array_check[1] == 'create') {
             TNotification::Add(self::$_main_title . _lg(" has been create"), 'success');
         } elseif ($array_check[1] == 'edit') {
             TNotification::Add(self::$_main_title . _lg(" has been update"), 'success');
         }
     }
 }
Esempio n. 8
0
 /**
  * render listview and show
  * @param string $location base of controller class name
  */
 public function Render($location = '')
 {
     $date_format = 'Y/m/d H:i';
     // pre hook
     _hk('P' . ':' . __CLASS__ . ':' . __FUNCTION__, $this, $location, $date_format);
     $date = TDate::GetInstance();
     $result = null;
     // show saerch or item
     if ($this->search != null || $this->relation != array()) {
         $result .= '<div class="listview-search row" action="' . UR_MP . $location . '" >';
         // show search here
         if ($this->search != null) {
             //            die($prefix);
             $result .= '<form class="grd12"  action="' . UR_MP . $location . '">';
             $result .= '<input type="text" name="search" class="search-box" placeholder="' . _lg('Search') . '..." />';
             $result .= '<input type="hidden" name="fields" class="search-fields" value="' . $this->search . '"  />';
             if (isset($_GET['filter'])) {
                 $result .= '<input type="hidden" name="filter" value="' . $_GET['filter'] . '"  />';
             }
             $result .= '&nbsp;<button><span class="fa fa-search"></span></button>';
             if (isset($_GET['search']) && $_GET['search'] != '') {
                 $result .= '&nbsp;<button onclick="$(this).parent().find(\'.search,.search-fields\').remove();"><span class="fa fa-close"></span></button>';
             }
             $result .= '</form>';
         }
         // relation info
         if ($this->relation != array()) {
             $md = new TModel($this->relation['table']);
             $result .= '<form class="grd12 "  action="' . UR_MP . $location . '">' . ($this->relation['ico'] != '' ? '<span class="fa fa-' . $this->relation['ico'] . '"></span>' : '') . '<select name="rel" class="rel">';
             $result .= '<option value="0" >' . _lg('Select an item to search') . '</option>';
             foreach ($md->Selectable($this->relation['title'], $this->relation['value']) as $item) {
                 $result .= '<option value="' . $item[0] . '" ' . (isset($_GET['rel']) && $_GET['rel'] == $item[0] ? 'selected="selected"' : '') . ' >' . $item[1] . '</option>';
             }
             $result .= '</select>';
             $result .= '<input type="hidden" name="typ" class="rel-type" value="' . $this->relation['rel_type'] . '" />';
             $result .= '&nbsp;<button><span class="fa fa-search"></span></button>';
             if (isset($_GET['rel']) && $_GET['rel'] != '') {
                 $result .= '&nbsp;<button onclick="$(this).parent().find(\'.rel,.rel-type\').remove();"><span class="fa fa-close"></span></button>';
             }
             $result .= '</form>';
         }
         $result .= '</div>';
     }
     // show all filter here
     if ($this->filter['title'] != array()) {
         $result .= '<div class="filter">';
         // get prefix
         $prefix = GetLinkPrefix('filter');
         // show title and no filter item named "All";
         $result .= '<span> ' . _lg('Filter') . ': </span> <a class="button" href="' . $prefix . '"> ' . _lg('All') . '</a>';
         // show filter lisr
         foreach ($this->filter['title'] as $key => $value) {
             $result .= '<a class="button" href="' . $prefix . 'filter=' . $this->filter['key'][$key] . ',' . $this->filter['value'][$key] . '">' . $value . '</a>';
         }
         $result .= '</div>';
     }
     // get order by column
     $prefix = GetLinkPrefix('order,desc');
     // get id order and choose good value for this
     if (isset($_GET['order']) && $_GET['order'] == $this->id) {
         $id_order = $prefix;
     } else {
         $id_order = $prefix . 'order=' . $this->id;
     }
     // show form head here when have bulk action
     if ($this->bulk_action['title'] != array()) {
         $result .= '<form method="post" action="' . UR_MP . $location . '/BulkAction">';
     }
     //start render listview header
     // start with bulk action checkbox and id header
     $result .= '<ul class="listview">
 <li class="pinned animate"> 
     <div  class="row">
         <div class="grd1"> <input type="checkbox" class="checkall" />  </div>
         <a href="' . $id_order . '"><div class="grd2 header"> ' . _lg('no.') . ' </div></a>';
     // show header column title
     foreach ($this->column['title'] as $key => $value) {
         if (substr($this->column['key'][$key], 0, 1) == '%') {
             $col_name = substr($this->column['key'][$key], 2);
         } else {
             $col_name = $this->column['key'][$key];
         }
         $result .= '<a href="' . $prefix . 'order=' . $col_name . (!isset($_GET['desc']) && isset($_GET['order']) && $_GET['order'] == $col_name ? '&desc=1' : '') . '"><div class="grd' . $this->column['size'][$key] . '">' . $value . '</div></a>';
     }
     // action haader
     $result .= '<div class="grd' . $this->action['size'] . '"> &nbsp; </div>';
     $result .= '</div>
 </li>';
     // show all records in this page
     foreach ($this->assoc_list as $record) {
         //start with bulk action checkbox and id
         $result .= '<li> 
     <div  class="row">';
         $result .= '<div class="grd1">' . PHP_EOL . ' <input type="checkbox" ' . 'class="listview-checkbox" name="id[]" value="' . $record[$this->id] . '" />' . PHP_EOL . ' </div>' . PHP_EOL;
         $result .= '<div class="grd2"> ' . $record[$this->id] . ' </div>';
         // show record columns added before by size
         foreach ($this->column['key'] as $key => $value) {
             if (strpos($value, ',') == false) {
                 $result .= PHP_EOL . '<div class="grd' . $this->column['size'][$key] . '">' . PHP_EOL;
                 switch (substr($value, 0, 2)) {
                     case '%i':
                         $a = substr($value, 2);
                         $result .= long2ip($record[$a]);
                         break;
                     case '%t':
                         $a = substr($value, 2);
                         $result .= $date->PDate($date_format, $record[$a]);
                         break;
                         // show array
                     // show array
                     case '%a':
                         $a = substr($value, 2);
                         $v = explode('|', $a);
                         $arr = $v[0];
                         global ${$arr};
                         $array = ${$arr};
                         $result .= $array[$record[$v[1]]];
                         break;
                     case '%1':
                     case '%2':
                     case '%3':
                     case '%4':
                     case '%5':
                     case '%6':
                     case '%7':
                     case '%8':
                     case '%9':
                         $p = substr($value, 1, 1);
                         $a = substr($value, 2);
                         $result .= sprintf($this->pattren[$p], $record[$a]);
                         break;
                     default:
                         $result .= $record[$value];
                         break;
                 }
                 $result .= '</div>' . PHP_EOL;
             } else {
                 $temp = explode(',', $value);
                 $result .= PHP_EOL . '<div class="grd' . $this->column['size'][$key] . '">';
                 foreach ($temp as $col) {
                     $result .= $record[$col] . PHP_EOL;
                 }
                 $result .= '</div>' . PHP_EOL;
             }
         }
         // add action to record
         $result .= PHP_EOL . '<div class="grd' . $this->action['size'] . ' c' . ($this->action['class'] == '' ? '' : $record[$this->action['class']]) . '">';
         $tmp = str_replace("%id%", $record[$this->id], $this->action['pattern']);
         if ($this->id == 'comment_id') {
             $result .= str_replace("%topic%", $record['comment_topic_id'], $tmp);
         } else {
             $result .= $tmp;
         }
         $result .= '</div>' . PHP_EOL;
         $result .= '</div>' . PHP_EOL . '</li>' . PHP_EOL;
     }
     $result .= '</ul>' . PHP_EOL;
     // if have bulk action show this after list view
     if ($this->bulk_action['title'] != array()) {
         $result .= '<div class="bulk-action">
                 <select name="action">';
         // list of bulk actions
         foreach ($this->bulk_action['function'] as $key => $value) {
             $result .= '<option  value="' . $value . ',' . $this->bulk_action['value'][$key] . '">' . $this->bulk_action['title'][$key] . '</option>';
         }
         $result .= '</select>';
         $result .= '<input type="submit" value="' . _lg('Bulk apply') . '" />' . '<div class="left" > ' . '<input type="button" value="' . _lg('Check All') . '" class="chkall" data-chekbox="listview-checkbox" /> ' . '<input type="button" value="' . _lg('Check None') . '" class="chknone" data-chekbox="listview-checkbox" /> ' . '<input type="button" value="' . _lg('Check Toggle') . '" class="chktoggle" data-chekbox="listview-checkbox" /> ' . '</div>' . '</div>' . '</form>';
     }
     // result hook
     _hk('R' . ':' . __CLASS__ . ':' . __FUNCTION__, $this, $result);
     echo $result;
 }
 public static function Loader()
 {
     global $side_menu;
     $index = $side_menu->AddItem(_lg('Categories'), '#', 0, 'fa-book');
     $side_menu->AddItem(_lg('Categories classic list'), UR_MP . 'Category', $index);
     $side_menu->AddItem(_lg('Categories node list'), UR_MP . 'Category/Pro', $index);
 }
Esempio n. 10
0
<?php

$frm = new TForm(UR_MP . 'Member/Insert', 'post', array('class' => 'form rtl'));
$frm->AddField('text', 'نام', null, array('name' => 'member_name'));
$frm->AddField('email', 'ایمیل', null, array('name' => 'member_email'));
$frm->AddField('password', 'گذرواژه', null, array('name' => 'member_password'));
$frm->AddField('text', 'استاتوس', null, array('name' => 'member_status'));
$frm->AddField('text', 'زمان تمدید', null, array('name' => 'member_active_time', 'class' => _lg('datepicker')));
$frm->AddField('file', 'آواتار', null, array('name' => 'member_avatar'));
$frm->AddField('text', 'مقطع', null, array('name' => 'member_degree'));
$frm->AddField('text', 'رشته تحصیلی', null, array('name' => 'member_field'));
$frm->AddField('text', 'شماره تماس', null, array('name' => 'member_number'));
$frm->AddField('text', 'شهر', null, array('name' => 'member_city'));
$frm->AddField('select', 'نوع', null, array('name' => 'member_type'), array(0 => array('0', 'تایید نشده'), 1 => array('1', 'تایید شده'), 2 => array('2', 'اخراجی')));
$frm->AddField('submit', '', 'ارسال');
?>
<br />
<h2 class="rtl">
    <?php 
echo $this->title;
?>
</h2>
<br />
<br />
<div class="row">
    <div class="grd-primary">
        <?php 
$frm->Render();
?>

    </div>
Esempio n. 11
0
<?php

$this->widget_prepared = '<ul class="accordion" id="prepared"> ';
$this->widget_prepared .= '<li class="placeholder">' . _lg('prepare your widgets here') . '</li>';
foreach ($this->prepared as $record) {
    $cls = $record['widget_class'];
    if (!class_exists($cls, false)) {
        require './../upload/widget/' . $record['widget_class'] . '.php';
    }
    $class = new $cls(WIDGET_PREPARE_MODE);
    $setting = unserialize($record['widget_setting']);
    $class->LoadSetting($setting);
    $this->widget_prepared .= '<li data-trash="prepared" data-class="' . $cls . '" data-id="' . $record['widget_id'] . '">';
    $this->widget_prepared .= '<h3>' . $class->Title() . '</h3>';
    $this->widget_prepared .= '<div>';
    $this->widget_prepared .= '<form method="post" class="' . $cls . ' from ajax"' . ' action="' . UR_MP . 'Widget/Update/' . $record['widget_id'] . '">';
    $this->widget_prepared .= $class->Detail();
    $this->widget_prepared .= '</form>';
    $this->widget_prepared .= '</div>';
    $this->widget_prepared .= '</li>';
}
$this->widget_prepared .= '</ul>';
Esempio n. 12
0
 public static function Loader()
 {
     global $side_menu;
     $side_menu->AddItem(_lg('Logout'), UR_MP . 'Access/Logout', 0, 'fa-user', 999);
 }
Esempio n. 13
0
 /**
  * relative date
  * @param string $time
  * @return string
  * @test need to translate
  */
 public function RDate($time = 'now')
 {
     $format = 'd m Y H:i';
     // Pre hook
     _hk('P' . ':' . __CLASS__ . ':' . __FUNCTION__, $this, $time, $format);
     $time = $this->_makeTime($time);
     $delta = time() - $time;
     if ($delta < 1 * MINUTE) {
         $result = $delta == 1 ? _lg("one second ago") : $delta . _lg(" seconds ago");
     }
     if ($delta < 2 * MINUTE) {
         $result = _lg("a minute ago");
     }
     if ($delta < 45 * MINUTE) {
         $result = floor($delta / MINUTE) . _lg(" minutes ago");
     }
     if ($delta < 90 * MINUTE) {
         $result = _lg("an hour ago");
     }
     if ($delta < 24 * HOUR) {
         $result = floor($delta / HOUR) . _lg(" hours ago");
     }
     if ($delta < 48 * HOUR) {
         $result = _lg("yesterday");
     }
     if ($delta < 30 * DAY) {
         $result = floor($delta / DAY) . _lg(" days ago");
     } else {
         $result = $this->SDate($format, $time);
     }
     // result hook
     _hk('R' . ':' . __CLASS__ . ':' . __FUNCTION__, $this, $result);
     return $result;
 }
Esempio n. 14
0
 /**
  * make custom options of listbox and combobox 
  * @param mixed $items option items
  * @param var $value value for selcet default
  * @param bool $is_string_key is string key or not
  * @return string
  */
 private function _makeCustomOptions($items, $value, $is_string_key)
 {
     $select = null;
     if ($is_string_key == true) {
         $items = array_flip($items);
     }
     if ($value == null) {
         // is null
         foreach ($items as $k => $v) {
             $select .= '<option value="' . $k . '" >' . _lg($v) . '</option>' . PHP_EOL;
         }
     } else {
         foreach ($items as $k => $v) {
             if ($value == $k) {
                 $select .= '<option selected="" value="' . $k . '" >' . _lg($v) . '</option>' . PHP_EOL;
                 continue;
             }
             $select .= '<option value="' . $k . '" >' . _lg($v) . '</option>' . PHP_EOL;
         }
     }
     // is null
     return $select;
 }
Esempio n. 15
0
 public static function Loader()
 {
     global $side_menu;
     $side_menu->AddItem(_lg('Desktop'), UR_MP, 0, 'fa-dashboard', -9999);
     $side_menu->AddItem(_lg('Setting'), UR_MP . 'Index/Setting', 0, 'fa-cogs');
 }
Esempio n. 16
0
 public static function Loader()
 {
     global $side_menu;
     $index = $side_menu->AddItem(_lg('Members'), '#', 0, 'fa-group');
     $side_menu->AddItem(_lg('Members list'), UR_MP . 'Member', $index);
     $side_menu->AddItem(_lg("New member"), UR_MP . 'Member/NewMember', $index);
 }
Esempio n. 17
0
        <link type="text/css" rel="stylesheet" href="assets/css/element-rtl.css" />
        <?php 
}
?>
        <style type="text/css">
            #message:before{
                content:"<?php 
echo _lg($_GET['title']);
?>
";
            }
        </style>
    </head>
    <body <?php 
if (_lg('DIR') == 'rtl') {
    ?>
        dir='rtl'
        <?php 
}
?>
> 
        <section id="message">
            <h2>
                <?php 
echo _lg($_GET['text']);
?>
            </h2>
        </section>
    </body>
</html>
Esempio n. 18
0
 function __construct()
 {
     parent::__construct();
     self::$_main_title = _lg('Search');
 }
Esempio n. 19
0
?>
            <br />
            <br />
            <h3>
                افزودن پیوست
            </h3>
            <br />
            <form action="<?php 
echo UR_MP;
?>
Upload/UploadAttach/attach/<?php 
echo $this->record['topic_id'];
?>
" method='post' enctype='multipart/form-data'>
                <input type="text"  name="label" maxlength="250" class="input" placeholder="<?php 
echo _lg('file label');
?>
"/> <br /><br />

                <input type="file"  name="attach" /> <br />
                <input type="submit"  value="پیوست کن" />

            </form>
        </div>
        <div class="attach">
            <h3>
                تصویر شاخص
            </h3>
            <img src="<?php 
echo $this->record['topic_image'];
?>
Esempio n. 20
0
 public function LoadExtedentLib()
 {
     if (_lg('ltr') == 'rtl') {
         echo "\n\t" . '<!-- rtl -->
     <link type="text/css" rel="stylesheet" href="' . UR_MP_ASSETS . 'css/general-rtl.css" />
     <link type="text/css" rel="stylesheet" href="' . UR_MP_ASSETS . 'css/element-rtl.css" />' . PHP_EOL . PHP_EOL;
     }
     echo "\n\t<!-- css device load--> \n";
     self::LoadCMCSS('huge');
     self::LoadCMCSS('desktop');
     self::LoadCMCSS('tablet');
     self::LoadCMCSS('mobile');
 }
Esempio n. 21
0
<?php

//var_dump($this->record);
$date = TDate::GetInstance();
$frm = new TForm(UR_MP . 'Member/Update/' . $this->record['member_id'], 'post', array('class' => 'form rtl'));
$frm->AddField('text', 'نام', $this->record['member_name'], array('name' => 'member_name'));
$frm->AddField('email', 'ایمیل', $this->record['member_email'], array('name' => 'member_email'));
$frm->AddField('password', 'گذرواژه', null, array('name' => 'member_password'));
$frm->AddField('text', 'استاتوس', $this->record['member_status'], array('name' => 'member_status'));
$frm->AddField('text', 'زمان تمدید', $date->PDate('Y/m/d', $this->record['member_active_time']), array('name' => 'member_active_time', 'class' => _lg('datepicker')));
$frm->AddField('file', 'آواتار', $this->record['member_id'], array('name' => 'member_avatar'));
$frm->AddField('text', 'مقطع', $this->record['member_degree'], array('name' => 'member_degree'));
$frm->AddField('text', 'رشته تحصیلی', $this->record['member_field'], array('name' => 'member_field'));
$frm->AddField('text', 'شماره تماس', $this->record['member_number'], array('name' => 'member_number'));
$frm->AddField('text', 'شهر', $this->record['member_city'], array('name' => 'member_city'));
$frm->AddField('textarea', 'توصیه مشاور/ پشتیبان', $this->record['member_comment'], array('name' => 'member_comment', 'class' => 'full-width'));
$frm->AddField('select', 'نوع', $this->record['member_type'], array('name' => 'member_type'), array(0 => array('0', 'تایید نشده'), 1 => array('1', 'تایید شده'), 2 => array('2', 'اخراجی')));
$frm->AddField('select', 'وضعیت چت', $this->record['member_chat'], array('name' => 'member_chat'), array(0 => array('1', ' فعال'), 1 => array('0', 'اخراجی')));
$frm->AddField('submit', '', 'ویرایش');
//print_r($this->reports);
?>
<br />
<h2 class="rtl">
    <?php 
echo $this->title;
?>
</h2>
<br />
<br />
<div class="row">
    <div class="grd-primary">
Esempio n. 22
0
<br />
<br />
<div class="row">
    <div class="grd-primary">
        <label>
            <select name="mode" id="mode">
                <option value="0"> <?php 
echo _lg('name');
?>
 </option>
                <option value="1"> <?php 
echo _lg('tel');
?>
 </option>
                <option value="2"> <?php 
echo _lg('email');
?>
 </option>

            </select>
        </label>
        <label>
            جستجو:
            <input type="text" maxlength="30" class="autocomplete" />
        </label>
    </div>
    <div class="grd-secondary">

    </div>

    <script type="text/javascript">
Esempio n. 23
0
$listview->SetPattern(1, '<img src="' . UR_MP_ASSETS . 'images/active%s.png" alt="[plugin status]" />');
$listview->AddColum(_lg('status'), '%1plugin_status', 2);
$listview->AddColum('', 'plugin_discrption', 16);
$pattern = '<a class="button delete" href="' . UR_MP . 'Plugin/Delete/%id%"> ' . _lg('Delete') . ' </a>
                <a class="button active" href="' . UR_MP . 'Plugin/Status/%id%/1"> ' . _lg('Active') . ' </a>
                <a class="button deactive" href="' . UR_MP . 'Plugin/Status/%id%/0"> ' . _lg('Deactive') . '</a>';
$listview->AddAction($pattern, 6, 'plugin_status');
$listview->AddFilter(_lg('Deactived'), 'plugin_status', '0');
$listview->AddFilter(_lg('Actived'), 'plugin_status', '1');
$listview->AddBulkAcction(_lg('Deactive'), 'Edit', 'plugin_status,0');
$listview->AddBulkAcction(_lg('Active'), 'Edit', 'plugin_status,1');
$listview->AddBulkAcction(_lg('Delete'), 'Delete', null);
$listview->Render('Plugin');
$frm = new TForm(UR_MP . 'Plugin/upload');
$frm->AddField('file', _lg('zip file'), null, array('name' => 'file'));
$frm->AddField('submit', '', _lg('Upload'));
?>
<br />

<div style="background: #1392e9;padding:1em;margin:1em;">
    <h2>
        <?php 
_lp('Upload new plugin');
?>
    </h2>
    <br />
    <?php 
$frm->Render();
?>
</div>
<style type="text/css">
Esempio n. 24
0
function write_bev($bev, $req)
{
    global $curr_stat, $stat, $CRLF;
    if ($stat['STAT_INIT'] !== $curr_stat) {
        _lg("w: {$req}" . PHP_EOL . PHP_EOL);
        $bev->write($req . $CRLF);
    }
    $curr_stat = $stat['STAT_INIT'];
}
Esempio n. 25
0
<?php

$prefix = GetLinkPrefix('order');
global $m_type;
$m_type = array(0 => 'تایید نشده', 1 => 'تایید شده', 2 => 'اخراجی');
$listview = new TListView('member_id');
$listview->SetList($this->cls_list);
$listview->AddColum(_lg('Name'), 'member_name', 8);
$listview->AddColum(_lg('Email'), 'member_email', 4);
$listview->AddColum(_lg('Status'), '%am_type|member_type', 2);
$pattern = '<a class="button delete" href="' . UR_MP . 'Member/Delete/%id%"> ' . _lg('Delete') . ' </a>
            <a class="button" href="' . UR_MP . 'Member/Edit/%id%"> ' . _lg('Edit') . ' </a>';
$listview->AddAction($pattern, 4, 'member_type');
$listview->AddFilter(_lg('Pending'), 'member_type', '0');
$listview->AddFilter(_lg('Approved'), 'member_type', '1');
$listview->AddFilter(_lg('Banned'), 'member_type', '2');
$listview->AddBulkAcction(_lg('Pending'), 'Edit', 'member_type,0');
$listview->AddBulkAcction(_lg('Approving'), 'Edit', 'member_type,1');
$listview->AddBulkAcction(_lg('Banning'), 'Edit', 'member_type,2');
$listview->AddBulkAcction(_lg('Delete'), 'Delete', null);
$listview->AddSearch('member_name,member_email,member_number');
$listview->Render('Member');
$this->pagination->Render();
Esempio n. 26
0
 public static function Loader()
 {
     global $side_menu;
     $side_menu->AddItem(_lg('Comments'), UR_MP . 'Comment', 0, 'fa-comments');
 }
Esempio n. 27
0
 /**
  * select all category expect an id + no parent item.
  * @param int $expect_id
  * @return mixed
  */
 public function CategoryByExpect($expect_id = '0')
 {
     // Pre hook
     _hk('P' . ':' . __CLASS__ . ':' . __FUNCTION__, $this, $expect_id);
     $sql = "SELECT " . $this->table_name . '_id' . ", " . $this->table_name . '_title' . " FROM %table% WHERE " . $this->table_name . '_id' . ' <> :id ';
     $result = $this->db->Select($sql, array($this->table_name), array('type' => 'i', ':id' => (int) $expect_id), PDO::FETCH_BOTH);
     $result[-1][0] = 0;
     $result[-1][1] = _lg('No parent');
     sort($result);
     // result hook
     _hk('R' . ':' . __CLASS__ . ':' . __FUNCTION__, $this, $result);
     return $result;
 }
 public static function Loader()
 {
     global $side_menu;
     $side_menu->AddItem(_lg('DropDown Menu'), UR_MP . 'DropDownMenu', 0, 'fa-ellipsis-h');
 }
Esempio n. 29
0
 public static function Loader()
 {
     global $side_menu;
     $index = $side_menu->AddItem(_lg('Plugin'), 'Plugin', 0, 'fa-plug');
 }
Esempio n. 30
0
 function __construct()
 {
     parent::__construct();
     self::$_main_title = _lg('Upload');
 }