コード例 #1
0
ファイル: publications_base.php プロジェクト: romlg/cms36
 function Show()
 {
     if (!empty($GLOBALS['_POST'])) {
         $actions = get('actions', '', 'p');
         if ($actions) {
             return $this->{$actions}();
         }
     }
     // проверим есть ли pid и если есть то относится ли к нужному root_id
     $filter = get('filter', array());
     if ($filter['all_pids']) {
         $page_root_id = sql_getValue("SELECT root_id FROM `tree` WHERE id='" . (int) $filter['all_pids'] . "'");
         if ($page_root_id != domainRootID()) {
             $_GET['filter']['all_pids'] = 0;
         }
     }
     $tree = array();
     $root_id = domainRootId();
     if ($root_id > 0 && allowDomainForUser($root_id)) {
         $tree = $tree + $this->getPages((int) $root_id);
         $temp = $tree;
         $tree = array();
         foreach ($temp as $val) {
             $tree[$val['id']] = $val['name'];
         }
     }
     $filter_pid_value = array('' => 'все') + $tree;
     // строим таблицу
     require_once core('list_table');
     $data['table'] = list_table(array('columns' => array(array('select' => 'p.id', 'display' => 'id', 'type' => 'checkbox'), array('select' => 'p.name', 'display' => 'name', 'flags' => FLAG_SORT | FLAG_SEARCH), array('select' => 'UNIX_TIMESTAMP(p.date)', 'as' => 'date', 'display' => 'date', 'flags' => FLAG_SORT | FLAG_FILTER, 'filter_type' => 'date', 'filter_value' => 'date', 'type' => 'date'), array('select' => 'p.pid', 'display' => 'pid', 'type' => 'dir'), $root_id > 0 ? array('select' => 'CAST(CONCAT(p.pid,\',\',p.pids) AS CHAR)', 'as' => 'all_pids', 'flags' => FLAG_FILTER, 'filter_type' => 'array', 'filter_value' => $filter_pid_value, 'filter_display' => 'pid', 'filter_rule' => 'find_in_set') : array('select' => 'CAST(CONCAT(p.pid,\',\',p.pids) AS CHAR)', 'as' => 'all_pids'), array('select' => 'p.visible', 'display' => 'visible', 'type' => 'visible', 'flags' => FLAG_SORT | FLAG_FILTER, 'filter_type' => 'array', 'filter_value' => array('') + array('1' => 'Да', '2' => 'Нет'), 'filter_field' => 'IF(p.visible=0,2,1)'), array('select' => 'p.id', 'display' => 'showInSite', 'type' => 'show'), array('select' => 't.dir'), array('select' => 't.root_id'), array('select' => 't.name', 'as' => 't_name', 'flags' => FLAG_SEARCH), array('select' => 'p.notice', 'flags' => FLAG_SEARCH), array('select' => 'p.text', 'flags' => FLAG_SEARCH)), 'from' => $this->table . " as p\n\t\t\tLEFT JOIN `tree` as t ON t . id = p . pid\n\t\t\t", 'where' => (domainRootId() > 0 ? ' (t.root_id=' . domainRootId() . ' OR t.root_id IS NULL OR FIND_IN_SET(' . domainRootId() . ', (SELECT GROUP_CONCAT( DISTINCT CAST(root_id AS CHAR)) FROM tree WHERE FIND_IN_SET(id, CONCAT(p.pid, ",", p.pids)))) )' : '') . $this->where_extra, 'orderby' => 'p.date DESC', 'params' => array('page' => $this->name, 'do' => 'show'), 'dblclick' => 'editItem(p.id)', 'click' => 'ID=cb.value'), $this);
     $data['table'] .= "<script type='text/javascript'>\n        \$('ul.navPanel').find('a:first').attr('onclick','').click(function(){\n            \$('.createbox').show().find('input[type=text]').focus();\n        });\n        </script>\n        <style type='text/css'>\n        .createbox {\n            width:307px;\n            height:100px;\n            background-color:#fff;\n            border:2px solid #FAAE3E;\n            position:fixed;\n            left:550px;\n            top:400px;\n            display:none;\n            padding:10px;\n            box-shadow:5px 5px 5px rgba(0,0,0,0.5);\n        }\n            .createbox .close {\n                text-decoration:none;\n                position:relative;\n                top:-7px;\n                left:304px;\n                font-size:16px;\n                color:#f00;\n            }\n        </style>\n        <div class='createbox'>\n            <a href='javascript:void(0);' onclick='\$(\".createbox\").hide();' class='close'>X</a>\n            <form action='' method='post'>\n                <input type='hidden' name='page' value='{$this->name}' />\n                <input type='hidden' name='do' value='editCreate' />\n                <!--input type='hidden' name='ref' value='/admin/editor.php?page={$this->name}' /-->\n                <label>Введите название новой публикации:</label>\n                <input type='text' class='text' name='fld[name]' id='fld_name' value='' />\n                <a href='javascript:void(0);' onclick='if(\$(this).parent().find(\"#fld_name\").val()) \$(this).parent().submit(); else alert(\"Вы не ввели название публикации\");' class='button' style='position:relative;left:90px;top:5px;'><span>Создать</span></a>\n            </form>\n        </div>";
     $this->AddStrings($data);
     return $this->Parse($data, LIST_TEMPLATE);
 }
コード例 #2
0
ファイル: infoblocks.php プロジェクト: romlg/cms36
 function Show()
 {
     if (!empty($GLOBALS['_POST'])) {
         $actions = get('actions', '', 'p');
         if ($actions) {
             return $this->{$actions}();
         }
     }
     $positions = $this->getFilterPositions();
     if (!$positions) {
         echo "<p style='color: red;'>Не задан массив infoblocks_positions в файле settings.cfg.php</p>";
     }
     // строим таблицу
     require_once core('list_table');
     $columns = array(array('select' => 'p.id', 'display' => 'id', 'type' => 'checkbox'), array('select' => 'p.name', 'display' => 'name', 'flags' => FLAG_SORT | FLAG_SEARCH), domainRootID() > 0 ? array('select' => 'p.position', 'display' => 'position', 'type' => 'position', 'flags' => FLAG_FILTER, 'filter_type' => 'array', 'filter_value' => array('') + $positions) : array('select' => 'p.position', 'display' => 'position', 'type' => 'position', 'flags' => FLAG_SEARCH), array('select' => 'IF(p.visible=1,1,2)', 'as' => 'visible', 'display' => 'visible', 'type' => 'visible', 'flags' => FLAG_SORT | FLAG_FILTER, 'filter_type' => 'array', 'filter_value' => array('') + array('1' => 'Да', '2' => 'Нет')), array('select' => 'IF(p.publ_announce=1,1,2)', 'as' => 'publ_announce', 'flags' => FLAG_FILTER, 'filter_type' => 'array', 'filter_display' => 'announce', 'filter_value' => array('') + array('1' => 'Да', '2' => 'Нет')), array('select' => 'p.priority', 'display' => 'priority', 'flags' => FLAG_SORT), array('select' => 'p.id', 'display' => 'showurl', 'type' => 'showurl'), array('select' => 'p.id', 'display' => 'hiddenurl', 'type' => 'hiddenurl'), array('select' => 'p.title', 'flags' => FLAG_SEARCH), array('select' => 'p.header_text', 'flags' => FLAG_SEARCH), array('select' => '(SELECT GROUP_CONCAT(",", ir.url) FROM infoblocks_rules AS ir WHERE p.id=ir.pid GROUP BY p.id)', 'flags' => FLAG_SEARCH));
     // проверим сколько сайтов, если несколько то выводим колонку
     global $site_domains;
     $current = current($site_domains);
     if (count($site_domains) > 1 || count($current['langs']) > 1) {
         $columns[] = array('select' => 'p.root_id', 'display' => 'root_id', 'type' => 'showsites');
     }
     $data['table'] = list_table(array('columns' => $columns, 'from' => $this->table . " as p", 'orderby' => 'p.name ASC', 'where' => domainRootId() > 0 ? 'root_id=' . domainRootID() : '', 'params' => array('page' => $this->name, 'do' => 'show'), 'dblclick' => 'editItem(p.id)', 'click' => 'ID=cb.value'), $this);
     $this->AddStrings($data);
     return $this->Parse($data, LIST_TEMPLATE);
 }
コード例 #3
0
ファイル: history.php プロジェクト: romlg/cms36
    function Show()
    {
        $return = '
		<script langauge = "JavaScript">
		function deleteItems()
		{

		}
		</script>
		<script language = "JavaScript">
var Ahistory0 = new Array(0,0,0,0,0,0,0,0,1);
var Ahistory1 = new Array(0,1,1,1,0,0,0,0,1);
var Ahistory2 = new Array(0,1,0,0,0,0,0,0,1);

window.parent.elemActions(\'history\', 0);
</script>
<script language="JavaScript" src="tooltip/tooltip.js"></script>
';
        require_once core('ajax_table');
        // Create templorary table
        sql_query("DROP TABLE tmp_history");
        sql_query("CREATE TABLE tmp_history (\n\t\t\ttype VARCHAR(50) NOT NULL,\n\t\t\tid INT UNSIGNED NOT NULL,\n\t\t\tdate INT UNSIGNED NOT NULL,\n\t\t\tdescription VARCHAR(255) NOT NULL,\n\t\t\ttext TEXT NOT NULL,\n\t\t\tPRIMARY KEY (type, id)\n\t\t)");
        // insert notes
        sql_query("INSERT INTO tmp_history SELECT 'note', id, date, name, text FROM notes WHERE client_id=" . $this->client_id);
        // insert notes
        sql_query("INSERT INTO tmp_history SELECT 'order', id, order_date, id, '' FROM orders WHERE client_id=" . $this->client_id);
        // insert notes
        sql_query("INSERT INTO tmp_history SELECT 'mail', id, UNIX_TIMESTAMP(em.date), em.subject, em.body FROM email_sent AS em LEFT JOIN email_log AS log ON em.id=log.email_id WHERE log.client_id=" . $this->client_id);
        $return .= ajax_table(array('columns' => array(array('select' => 'date', 'display' => 'date', 'type' => 'datetime', 'nowrap' => true), array('select' => 'type', 'display' => 'type', 'type' => 'type'), array('select' => 'description', 'display' => 'description', 'type' => 'description', 'width' => '50%'), array('select' => 'text'), array('select' => 'id', 'display' => 'edit', 'type' => 'edit', 'width' => '30', 'align' => 'center')), 'from' => 'tmp_history', 'orderby' => 'date DESC', 'params' => array('page' => $this->name, 'do' => 'show', 'client_id' => $this->client_id)), $this);
        return $return;
    }
コード例 #4
0
ファイル: cmsrouter.php プロジェクト: schpill/jsoncms
 public function __construct()
 {
     $this->request = core('request');
     $this->method = $this->request->method();
     $routes = (include path('config') . DS . 'routes.php');
     $routes = isAke($routes, $this->method, []);
     $this->handling($routes);
     if (is_callable($this->route)) {
         $cb = $this->route;
         $args = call_user_func_array($cb, $this->params);
         if (!is_array($args)) {
             $args = ['main', $args, true];
         }
         if (count($args) == 2) {
             $args[] = true;
         }
         $this->controller = current($args);
         $this->action = $args[1];
         $this->render = end($args);
     } else {
         $this->controller = 'main';
         $this->action = 'is404';
         $this->render = true;
     }
     $this->boot();
 }
コード例 #5
0
ファイル: log_change.php プロジェクト: romlg/cms36
 function Show()
 {
     if (!empty($GLOBALS['_POST'])) {
         $actions = get('actions', '', 'p');
         if ($actions) {
             return $this->{$actions}();
         }
     }
     $this->SetValues();
     require_once core('ajax_table');
     $data['thisname'] = $this->name;
     $data['root'] = is_root();
     $this->AddStrings($data);
     $_tables = sql_getRows('SHOW tables');
     foreach ($_tables as $key => $val) {
         $tables[$val] = $val;
     }
     $_transactions = sql_getColumn('SELECT distinct action FROM ' . $this->table . ' ORDER BY action');
     foreach ($_transactions as $key => $val) {
         $transactions[$val] = $val;
     }
     $where = '';
     if ($this->from_date && $this->to_date) {
         $where = ' UNIX_TIMESTAMP(date)>=' . $this->from_date . ' AND UNIX_TIMESTAMP(date)<=' . $this->to_date;
     }
     $data['table'] = ajax_table(array('columns' => array(array('select' => 'user', 'display' => 'user', 'width' => '1px', 'flags' => FLAG_SORT | FLAG_SEARCH), array('select' => 'object', 'display' => 'object', 'width' => '1px', 'flags' => FLAG_SORT | FLAG_FILTER | FLAG_SEARCH, 'filter_type' => 'array', 'filter_value' => array('' => '-- все --') + $tables, 'filter_rule' => 'find_in_set'), array('select' => 'action', 'display' => 'action', 'width' => '1px', 'flags' => FLAG_SORT | FLAG_FILTER | FLAG_SEARCH, 'filter_type' => 'array', 'filter_value' => array('' => '-- все --') + $transactions), array('select' => 'description', 'display' => 'description', 'type' => 'description', 'flags' => FLAG_SEARCH), array('select' => 'date', 'display' => 'date', 'type' => 'datetime', 'width' => '100px', 'flags' => FLAG_SORT)), 'from' => $this->table, 'where' => $where, 'orderby' => 'date DESC', 'params' => array('page' => $this->name, 'do' => 'show'), 'dblclick' => '', 'click' => ''), $this);
     $data['navig'] = $this->NavigForm();
     return $this->parse($data, $this->name . '.tmpl');
 }
コード例 #6
0
ファイル: discounts.php プロジェクト: romlg/cms36
    function Show()
    {
        if (!empty($GLOBALS['_POST'])) {
            $actions = get('actions', '', 'p');
            if ($actions) {
                return $this->{$actions}();
            }
        }
        require_once core('ajax_table');
        $ret['id'] = 0;
        $ret['auth_group'] = (int) get('auth_group');
        $ret['auth_groups'] = sql_getRows('select id, name from auth_groups order by priority, name', true);
        if (!$ret['auth_group']) {
            $ret['auth_group'] = key($ret['auth_groups']);
        }
        $ret['auth_group_type'] = sql_getValue('
			SELECT dt.type
			FROM auth_groups AS ag
			LEFT JOIN discount_types AS dt ON dt.id = ag.discount_type
			WHERE ag.id = ' . $ret['auth_group']);
        if ($ret['auth_group_type'] == 'fix') {
            $ret['table'] = ajax_table(array('columns' => array(array('select' => 'dg.id', 'type' => 'checkbox'), array('select' => 'dg.name', 'display' => 'product_group'), array('select' => 'discounts.discount', 'display' => 'discount', 'type' => 'edit', 'align' => 'right', 'text-align' => 'right', 'maxlength' => 2, 'size' => 2), array('select' => '""', 'display' => '', 'width' => '50%')), 'from' => 'discount_groups AS dg 
				LEFT OUTER JOIN discounts ON discounts.discount_group_id = dg.id AND discounts.user_discount_group_id=' . $ret['auth_group'], 'orderby' => 'priority, name', 'params' => array('page' => $this->name, 'do' => 'show', 'id' => '', 'auth_group' => $ret['auth_group']), 'click' => 'ID=cb.value;'), $this);
        } else {
            $ret['table'] = ajax_table(array('columns' => array(array('select' => 'id', 'type' => 'checkbox', 'display' => 'id'), array('select' => 'volume', 'display' => 'upvolume', 'type' => 'edit', 'align' => 'right', 'text-align' => 'right', 'maxlength' => 10, 'size' => 10), array('select' => 'discount', 'display' => 'discount', 'type' => 'edit', 'align' => 'right', 'text-align' => 'right', 'maxlength' => 2, 'size' => 2), array('select' => '""', 'display' => '', 'width' => '50%')), 'from' => 'discounts_volume', 'where' => 'auth_group_id=' . $ret['auth_group'], 'orderby' => 'volume', 'params' => array('page' => $this->name, 'do' => 'show', 'id' => '', 'auth_group' => $ret['auth_group']), 'click' => 'ID=cb.value;'), $this);
        }
        $this->AddStrings($ret);
        return $this->Parse($ret, $this->name . '.tmpl');
    }
コード例 #7
0
ファイル: subscribed.php プロジェクト: romlg/cms36
 function Show()
 {
     // обязательная фигня
     if (!empty($GLOBALS['_POST'])) {
         $actions = get('actions', '', 'p');
         if ($actions) {
             return $this->{$actions}();
         }
     }
     global $settings;
     $types = array();
     foreach ($settings['subscribe_categories'] as $key => $val) {
         if (isset($val['sub'])) {
             foreach ($val['sub'] as $k => $v) {
                 $types[$v['type']] = $v['title'];
             }
         }
     }
     require_once core('ajax_table');
     $data['table'] = ajax_table(array('columns' => array(array('select' => 'id', 'display' => 'id', 'type' => 'checkbox', 'width' => '1px'), array('select' => 'email', 'display' => 'email', 'flags' => FLAG_SORT | FLAG_SEARCH), array('select' => 'type', 'display' => 'type', 'type' => 'type', 'flags' => FLAG_SORT | FLAG_FILTER, 'filter_display' => 'type', 'filter_type' => 'array', 'filter_value' => array('' => '-- Все --') + $types, 'filter_field' => 'type')), 'from' => $this->table, 'where' => 'root_id=' . domainRootId(), 'params' => array('page' => $this->name, 'do' => 'show'), 'click' => 'ID=cb.value'), $this);
     $this->AddStrings($data);
     $data['thisname'] = $this->name;
     $data['thisname2'] = str_replace('/', '', $this->name);
     return Parse($data, "notify/tmpls/properties.tmpl");
 }
コード例 #8
0
ファイル: Outset.php プロジェクト: GuilhermeRios/ProjectDG
 protected function load_core()
 {
     include core("url");
     include core("controller");
     include core("model");
     $this->url = new Url();
 }
コード例 #9
0
ファイル: email.php プロジェクト: romlg/cms36
 function ShowRecipientsAdmins()
 {
     $data = sql_getRows("SELECT id, login, fullname FROM admins");
     require_once core('ajax_table');
     $ret['thisname'] = $this->name;
     $ret['table'] = ajax_table(array('from' => "admins", 'columns' => array(array('select' => 'id', 'display' => 'id', 'type' => 'checkbox', 'width' => '1px'), array('select' => 'login', 'display' => 'client_login', 'flags' => FLAG_SEARCH), array('select' => 'email', 'display' => 'email', 'flags' => FLAG_SEARCH)), 'where' => 'LENGTH(email)>0 ', 'orderby' => 'id', 'params' => array('page' => 'notify/send', 'do' => 'showplugin', 'func' => 'ShowRecipientsAdmins', 'plugin' => 'email'), 'click' => 'ID=cb.value;', 'target' => 'tmpemailshowrecipients', 'dblclick' => 'PasteRecipientsAdmins(id)'), $this);
     //pr($ret);
     return $ret;
 }
コード例 #10
0
ファイル: objtypes.php プロジェクト: romlg/cms36
 function Show()
 {
     require_once core('ajax_table');
     $rows = $this->getChilds($this->table, 'ORDER BY priority');
     $types = array();
     $this->getList($rows, $types, 1);
     $columns = array(array('select' => 'id', 'display' => 'id', 'type' => 'checkbox'), array('select' => 'name', 'display' => 'name', 'type' => 'name', 'flags' => FLAG_SEARCH | FLAG_SORT), array('select' => 'belong', 'type' => 'sell_type', 'display' => 'transaction'));
     return $this->Show_base($columns, $types);
 }
コード例 #11
0
ファイル: email_templates.php プロジェクト: romlg/cms36
 function ShowRecycle()
 {
     global $limit;
     $limit = -1;
     require_once core('ajax_table');
     $this->AddStrings($row);
     $row['table'] = ajax_table(array('columns' => array(array('select' => 'id', 'display' => 'id', 'type' => 'checkbox'), array('select' => "description", 'display' => 'comment'), array('select' => "subject", 'display' => 'subject')), 'where' => "visible<=0  AND (user_id IS NULL OR user_id=" . $GLOBALS['user']['id'] . ")", 'orderby' => 'updated DESC', 'params' => array('page' => $this->name, 'do' => 'show')), $this);
     return $this->Parse($row, 'recycle.tmpl');
 }
コード例 #12
0
ファイル: helpers.php プロジェクト: phpoxford/spires
function reply(string $text)
{
    $myNick = core(Client::class)->user()->nickname();
    $senderNick = core(InboundMessage::class)->nickname();
    $targets = core(InboundMessage::class)->targets();
    $targets = array_map(function ($target) use($myNick, $senderNick) {
        return $target === $myNick ? $senderNick : $target;
    }, $targets);
    send_to($targets, $text);
}
コード例 #13
0
ファイル: auth.php プロジェクト: rnaranjo21/Si99v0
function param($usuario, $password)
{
    session_start();
    $_SESSION['A'] = param($_POST['Usuario'], $_POST['Password']);
    $client = core();
    //Paramtros LOGIN
    $params = array("UserName" => $usuario, "Password" => $password, "ApplicationID" => "");
    $response = $client->__soapCall('Login', array($params));
    $token = $response->LoginResult->Token;
}
コード例 #14
0
ファイル: objects_room.php プロジェクト: romlg/cms36
 function ShowRecycle()
 {
     global $limit;
     $limit = -1;
     require_once core('ajax_table');
     $columns = sql_getRows('SHOW columns FROM ' . $this->table, 'Field');
     $name = isset($columns['name']) ? 'name' : 'address';
     $this->AddStrings($row);
     $row['table'] = ajax_table(array('columns' => array(array('select' => 'id', 'display' => 'id', 'type' => 'checkbox'), array('select' => $name, 'display' => 'name')), 'where' => 'visible<0 and obj_type_id="room"', 'orderby' => 'address', 'params' => array('page' => $this->name, 'do' => 'Show')), $this);
     return Parse($row, 'recycle.tmpl');
 }
コード例 #15
0
ファイル: site_groups.php プロジェクト: romlg/cms36
 function editGroupUsers()
 {
     $group_id = (int) get('id', 0, 'gp');
     if (!$group_id) {
         return;
     }
     $ret = array();
     $_GET['limit'] = -1;
     require_once core('ajax_table');
     $ret['table'] = ajax_table(array('columns' => array(array('select' => 'auth_users.name', 'display' => 'user_name', 'flags' => FLAG_SORT), array('select' => 'auth_users.login', 'display' => 'user_login', 'flags' => FLAG_SORT)), 'from' => 'auth_users LEFT JOIN auth_users_groups ON (auth_users_groups.user_id = auth_users.id)', 'params' => array('page' => $this->name, 'do' => 'editgroupusers', 'id' => $group_id), 'orderby' => 'auth_users.name', 'where' => 'auth_users_groups.group_id=' . $group_id, 'roll' => 0), $this);
     $this->AddStrings($ret);
     return $this->Parse($ret, $this->name . '.groupusers.tmpl');
 }
コード例 #16
0
ファイル: support_categories.php プロジェクト: romlg/cms36
 function Show()
 {
     if (!empty($GLOBALS['_POST'])) {
         $actions = get('actions', '', 'p');
         if ($actions) {
             return $this->{$actions}();
         }
     }
     require_once core('ajax_table');
     $ret['thisname'] = $this->name;
     $ret['table'] = ajax_table(array('columns' => array(array('select' => 'id', 'display' => 'id', 'type' => 'checkbox', 'width' => '1px'), array('select' => 'name', 'display' => 'name')), 'orderby' => 'priority, name', 'params' => array('page' => $this->name, 'do' => 'show', 'move' => 0), 'click' => 'ID=cb.value', 'dblclick' => 'editItem(id)'), $this);
     return $this->Parse($ret, $this->name . '.tmpl');
 }
コード例 #17
0
ファイル: voting.php プロジェクト: romlg/cms36
 function Show()
 {
     if (!empty($GLOBALS['_POST'])) {
         $actions = get('actions', '', 'p');
         if ($actions) {
             return $this->{$actions}();
         }
     }
     require_once core('ajax_table');
     $ret['thisname'] = $this->name;
     $ret['table'] = ajax_table(array('columns' => array(array('select' => 'id', 'display' => 'id', 'type' => 'checkbox'), array('select' => 'date', 'display' => 'date', 'type' => 'text', 'flags' => FLAG_SORT), array('select' => 'name', 'display' => 'name', 'flags' => FLAG_SORT), array('select' => 'visible', 'display' => 'visible', 'type' => 'visible', 'align' => 'center', 'flags' => FLAG_SORT), array('select' => 'open', 'display' => 'open', 'type' => 'visible', 'align' => 'center', 'flags' => FLAG_SORT)), 'where' => "lang='" . lang() . "' AND root_id=" . domainRootID(), 'orderby' => 'priority', 'params' => array('page' => $this->name, 'do' => 'show', 'move' => 0), 'dblclick' => 'editItem(id)', 'click' => 'ID = cb.value'), $this);
     return $this->Parse($ret, $this->name . '.tmpl');
 }
コード例 #18
0
ファイル: system.php プロジェクト: schpill/jsoncms
 public static function __callStatic($method, $args)
 {
     $table = Inflector::uncamelize($method);
     $database = 'system';
     if (empty($args)) {
         return core('fast')->instanciate($database, $table);
     } elseif (count($args) == 1) {
         $id = current($args);
         if (is_numeric($id)) {
             return core('fast')->instanciate($database, $table)->find((int) $id);
         }
     }
 }
コード例 #19
0
ファイル: dynamic_img.php プロジェクト: romlg/cms36
 /**
  * Оторажение списка персон
  * @return mixed
  */
 function Show()
 {
     if (!empty($_POST)) {
         $actions = get('actions', '', 'p');
         if ($actions) {
             return $this->{$actions}();
         }
     }
     require_once core('list_table');
     $ret['table'] = list_table(array('columns' => array(array('select' => 'id', 'display' => 'id', 'type' => 'checkbox', 'width' => '1px'), array('select' => 'name', 'display' => 'name', 'flags' => FLAG_SEARCH | FLAG_SORT), array('select' => 'image', 'type' => 'imagepath', 'display' => 'image'), array('select' => 'visible', 'display' => 'visible', 'type' => 'visible', 'flags' => FLAG_SORT | FLAG_FILTER, 'filter_type' => 'array', 'filter_value' => array('') + array('1' => 'Да', '2' => 'Нет'), 'filter_field' => 'IF(visible=0,2,1)'), array('select' => 'priority', 'display' => 'priority', 'flags' => FLAG_SEARCH | FLAG_SORT)), 'from' => $this->table, 'where' => domainRootId() > 0 ? '(FIND_IN_SET(' . domainRootID() . ', root_ids) OR root_ids="")' : "", 'params' => array('page' => $this->name, 'do' => 'show'), 'orderby' => 'name', 'script' => "function pic_preview(obj) {\n                obj_href = \$(obj).attr('link');\n                obj_init = \$(obj).attr('init');\n                if (typeof(obj_init)=='undefined') {\n                \t\$(obj).fancybox({\n                \t    'href' : obj_href,\n                        'centerOnScroll': true,\n                        'autoScale'     : false,\n                        'transitionIn'\t: 'none',\n                        'transitionOut'\t: 'none',\n                        'hideOnOverlayClick' : false\n                \t});\n                \t\$(obj).attr('init', 1);\n                    \$(obj).click();\n                }\n            }"), $this);
     $ret['thisname'] = $this->name;
     return $this->Parse($ret, LIST_TEMPLATE);
 }
コード例 #20
0
ファイル: csv_tools.php プロジェクト: romlg/cms36
 function Show()
 {
     if (!empty($GLOBALS['_POST'])) {
         $actions = get('actions', '', 'p');
         if ($actions) {
             return $this->{$actions}();
         }
     }
     require_once core('table.lib');
     $ret['thisname'] = $this->name;
     $ret['table'] = table(array('columns' => array(array('select' => 'id', 'display' => 'id', 'type' => 'checkbox'), array('select' => 'table_name', 'display' => 'table')), 'params' => array('page' => $this->name, 'do' => 'show', 'move' => 0), 'click' => 'ID=cb.value'), $this);
     return $this->Parse($ret, $this->name . '.tmpl');
 }
コード例 #21
0
ファイル: metrostations.php プロジェクト: romlg/cms36
 function Show()
 {
     if (!empty($_POST)) {
         $actions = get('actions', '', 'p');
         if ($actions) {
             return $this->{$actions}();
         }
     }
     require_once core('ajax_table');
     $ret['table'] = ajax_table(array('columns' => array(array('select' => 'id', 'display' => 'id', 'as' => 'id', 'width' => '1%', 'type' => 'checkbox'), array('select' => 'name', 'display' => 'name', 'flags' => FLAG_SEARCH | FLAG_SORT, 'width' => '1px'), array('select' => 'okrug', 'display' => 'okrug', 'flags' => FLAG_SEARCH | FLAG_SORT, 'width' => '1px', 'type' => 'okrug')), 'from' => $this->table, 'params' => array('page' => $this->name, 'do' => 'show'), 'orderby' => 'name', 'click' => 'ID=cb.value', 'dblclick' => 'editItem(id)'), $this);
     $ret['thisname'] = $this->name;
     return $this->Parse($ret, $this->name . '.tmpl');
 }
コード例 #22
0
ファイル: notify.php プロジェクト: romlg/cms36
 function Show()
 {
     if (!empty($GLOBALS['_POST'])) {
         $actions = get('actions', '', 'p');
         if ($actions) {
             return $this->{$actions}();
         }
     }
     require_once core('list_table');
     $ret['thisname'] = $this->name . '.editform';
     $ret['table'] = list_table(array('columns' => array(array('select' => 'id'), array('select' => 'event', 'display' => 'event', 'flags' => FLAG_SORT | FLAG_SEARCH), array('select' => 'description', 'display' => 'description', 'flags' => FLAG_SEARCH)), 'from' => $this->table, 'orderby' => '`event` ASC', 'params' => array('page' => $this->name, 'do' => 'show'), 'click' => 'ID=cb.value', 'dblclick' => 'editItem(id)'), $this);
     $this->AddStrings($ret);
     return $this->Parse($ret, LIST_TEMPLATE);
 }
コード例 #23
0
ファイル: file.php プロジェクト: romlg/cms36
 function Show()
 {
     if (!empty($GLOBALS['_POST'])) {
         $actions = get('actions', '', 'p');
         if ($actions) {
             return $this->{$actions}();
         }
     }
     // строим таблицу
     require_once core('list_table');
     $data['table'] = list_table(array('columns' => array(array('select' => 'id', 'display' => 'id', 'type' => 'checkbox'), array('select' => 'name', 'display' => 'name', 'flags' => FLAG_SEARCH), array('select' => 'fname', 'display' => 'fname'), array('select' => 'visible', 'display' => 'visible', 'type' => 'visible', 'flags' => FLAG_SORT)), 'from' => $this->table, 'orderby' => 'priority ASC', 'params' => array('page' => $this->name, 'do' => 'show'), 'dblclick' => 'editItem(id)', 'click' => 'ID=cb.value'), $this);
     $this->AddStrings($data);
     return $this->Parse($data, LIST_TEMPLATE);
 }
コード例 #24
0
ファイル: forms.php プロジェクト: romlg/cms36
 /**
  * Оторажение списка персон
  * @return mixed
  */
 function Show()
 {
     if (!empty($_POST)) {
         $actions = get('actions', '', 'p');
         if ($actions) {
             return $this->{$actions}();
         }
     }
     require_once core('list_table');
     $ret['table'] = list_table(array('columns' => array(array('select' => 'id', 'display' => 'id', 'type' => 'checkbox', 'width' => '1px'), array('select' => 'name_site', 'display' => 'name_site', 'flags' => FLAG_SEARCH | FLAG_SORT), array('select' => 'visible', 'display' => 'visible', 'type' => 'visible', 'flags' => FLAG_SORT | FLAG_FILTER, 'filter_type' => 'array', 'filter_value' => array('') + array('1' => 'Да', '2' => 'Нет'), 'filter_field' => 'IF(visible=0,2,1)'), array('select' => 'hash', 'display' => 'hash', 'type' => 'code')), 'from' => $this->table, 'params' => array('page' => $this->name, 'do' => 'show'), 'orderby' => 'name'), $this);
     $ret['table'] .= "\n            <script>\n                \$(document).ready(function(){\n\n                    function setcode(text, ptext){\n                        var toret = '';\n                        if (text) {\n                            switch (ptext) {\n                                case true:\n                                    toret = 'text_popup_html';\n                                    break;\n                                case false:\n                                    toret = 'text_html';\n                                    break;\n                                default:\n                                    toret = 'text_html';\n                                    break;\n                            }\n                        } else {\n                            switch (ptext) {\n                                case true:\n                                    toret = 'text_popup_normal';\n                                    break;\n                                case false:\n                                    toret = 'text_normal';\n                                    break;\n                                default:\n                                    toret = 'text_normal';\n                                    break;\n                            }\n                        }\n                        return toret;\n                    }\n\n                    \$('.popup_code_shower').change(function(){\n                        var text_obj = \$('#code_text_'+\$(this).attr('popup_code_id'));\n                        text_obj.text(text_obj.attr(setcode(\$('#code_shower_'+\$(this).attr('popup_code_id')).is(':checked'), \$(this).is(':checked'))));\n                    });\n                    \$('.code_shower').change(function(){\n                        var text_obj = \$('#code_text_'+\$(this).attr('code_id'));\n                        text_obj.text(text_obj.attr(setcode(\$(this).is(':checked'), \$('#popup_code_shower_'+\$(this).attr('code_id')).is(':checked'))));\n                    });\n\n                    \$('.code_shower_text').click(function(){\n                        \$(this).focus().select();\n                    });\n                    \$('.code_shower_href').click(function(){\n                        \$(this).hide();\n                        \$(this).next('div').show();\n                    });\n                });\n            </script>\n        ";
     $ret['thisname'] = $this->name;
     return $this->Parse($ret, LIST_TEMPLATE);
 }
コード例 #25
0
ファイル: publications_comments.php プロジェクト: romlg/cms36
 function Show()
 {
     if (!empty($GLOBALS['_POST'])) {
         $actions = get('actions', '', 'p');
         if ($actions) {
             return $this->{$actions}();
         }
     }
     // строим таблицу
     require_once core('list_table');
     $data['table'] = list_table(array('columns' => array(array('select' => 'c.id', 'display' => 'id', 'type' => 'checkbox'), array('select' => 'UNIX_TIMESTAMP(c.date)', 'as' => 'date', 'display' => 'date', 'flags' => FLAG_SORT | FLAG_FILTER, 'filter_type' => 'date', 'filter_value' => 'date', 'type' => 'date'), array('select' => 'IF(p.name IS NOT NULL, p.name, "-")', 'as' => 'publication', 'display' => 'publication', 'type' => 'publication_link'), array('select' => 'IF(a.name IS NOT NULL, a.name, c.name)', 'as' => 'user_name', 'display' => 'user_name', 'flags' => FLAG_SEARCH | FLAG_SORT, 'type' => 'user_link'), array('select' => 'c.text', 'type' => 'text', 'as' => 'descr', 'display' => 'text'), array('select' => 'c.visible', 'display' => 'visible', 'type' => 'visible', 'flags' => FLAG_SORT | FLAG_FILTER, 'filter_type' => 'array', 'filter_value' => array('') + array('1' => 'Да', '2' => 'Нет'), 'filter_field' => 'IF(c.visible=0,2,1)'), array('select' => 'c.user_id'), array('select' => 'c.publication_id'), array('select' => 'c.text', 'flags' => FLAG_SEARCH)), 'from' => $this->table . " as c\n\t\t\tLEFT JOIN `auth_users` as a ON a.id = c.user_id\n\t\t\tLEFT JOIN `publications` as p ON p.id = c.publication_id\n\t\t\tLEFT JOIN `tree` as t ON t.id = p.pid\n\t\t\t", 'where' => '(t.root_id=' . domainRootId() . ' OR t.root_id IS NULL)', 'orderby' => 'c.date DESC', 'params' => array('page' => $this->name, 'do' => 'show'), 'dblclick' => 'editItem(p.id)', 'click' => 'ID=cb.value'), $this);
     $this->AddStrings($data);
     return $this->Parse($data, LIST_TEMPLATE);
 }
コード例 #26
0
ファイル: guestbook.php プロジェクト: romlg/cms36
 function Show()
 {
     if (!empty($GLOBALS['_POST'])) {
         $actions = get('actions', '', 'p');
         if ($actions) {
             return $this->{$actions}();
         }
     }
     // строим таблицу
     require_once core('list_table');
     $data['table'] = list_table(array('columns' => array(array('select' => 'm.id', 'display' => 'id', 'type' => 'checkbox'), array('select' => 'm.name', 'display' => 'name', 'flags' => FLAG_SEARCH | FLAG_SORT, 'type' => 'text'), array('select' => 'UNIX_TIMESTAMP(m.date)', 'display' => 'date', 'flags' => FLAG_FILTER | FLAG_SORT, 'type' => 'date', 'filter_type' => 'date', 'filter_display' => 'Фильтровать по дате'), array('select' => 'm.message', 'display' => 'message', 'size' => '50'), array('select' => 'm.visible', 'display' => 'visible', 'type' => 'visible', 'flags' => FLAG_SORT), array('select' => 'm.visiblemain', 'display' => 'visiblemain', 'type' => 'visible', 'flags' => FLAG_SORT)), 'from' => $this->table . " AS m", 'orderby' => 'm.date DESC', 'params' => array('page' => $this->name, 'do' => 'show'), 'click' => 'ID=cb.value'), $this);
     $this->AddStrings($data);
     return $this->Parse($data, LIST_TEMPLATE);
 }
コード例 #27
0
ファイル: plans.php プロジェクト: romlg/cms36
 function Show()
 {
     if (!empty($_POST)) {
         $action = get('actions', '', 'p');
         if ($action) {
             return $this->{$action}();
         }
     }
     require_once core('ajax_table');
     $columns = array(array('select' => 'id', 'display' => 'id', 'type' => 'checkbox', 'width' => '1px'), array('select' => 'name', 'display' => 'name'), array('select' => 'image', 'display' => 'image', 'type' => 'image'));
     $ret['table'] = ajax_table(array('columns' => $columns, 'from' => $this->table, 'where' => 'pid=' . $_GET['pid'], 'params' => array('page' => $this->name, 'do' => 'show', 'move' => 0), 'orderby' => 'priority', 'click' => 'ID=cb.value', 'dblclick' => 'editItem(id)'), $this);
     $ret['thisname'] = $this->name;
     return $this->Parse($ret, $this->name . '.tmpl');
 }
コード例 #28
0
ファイル: surveys.php プロジェクト: romlg/cms36
 function Show()
 {
     if (!empty($GLOBALS['_POST'])) {
         $actions = get('actions', '', 'p');
         if ($actions) {
             return $this->{$actions}();
         }
     }
     // строим таблицу
     require_once core('list_table');
     $data['table'] = list_table(array('columns' => array(array('select' => 's.id', 'display' => 'id', 'type' => 'checkbox', 'width' => '1px'), array('select' => 's.name', 'display' => 'name', 'flags' => FLAG_SEARCH | FLAG_SORT), array('select' => 'UNIX_TIMESTAMP(s.date_from)', 'as' => 'date_from', 'display' => 'date_from', 'flags' => FLAG_SORT | FLAG_FILTER, 'filter_type' => 'date', 'filter_value' => 'date', 'type' => 'date'), array('select' => 'UNIX_TIMESTAMP(s.date_till)', 'as' => 'date_till', 'display' => 'date_till', 'flags' => FLAG_SORT | FLAG_FILTER, 'filter_type' => 'date', 'filter_value' => 'date', 'type' => 'date'), array('select' => 'IF(s.closed=1,1,2)', 'as' => 'closed', 'display' => 'closed', 'type' => 'closed', 'flags' => FLAG_SORT | FLAG_FILTER, 'filter_type' => 'array', 'filter_value' => array('') + array('1' => 'Да', '2' => 'Нет')), array('select' => 's.id', 'display' => 'export', 'type' => 'export'), array('select' => 's.id', 'display' => 'results', 'type' => 'results')), 'from' => $this->table . "  AS s", 'orderby' => 's.id DESC', 'where' => $this->selector ? 'root_id = ' . domainRootID() : null, 'params' => array('page' => $this->name, 'do' => 'show'), 'dblclick' => 'editItem(s.id)', 'click' => 'ID=cb.value'), $this);
     $this->AddStrings($data);
     return $this->Parse($data, $this->name . '.tmpl');
 }
コード例 #29
0
function compile($all = FALSE)
{
    $core = core();
    // Core.
    $core->©env->prep_for_cli_dev_procedure();
    ob_start();
    // Open a PHP output buffer.
    echo file_get_contents($core->©dir->n_seps_up(__FILE__) . '/core-sprintf.min.js') . "\n";
    echo file_get_contents($core->©dir->n_seps_up(__FILE__) . '/core-jq-scrollto.min.js') . "\n";
    echo file_get_contents($core->©dir->n_seps_up(__FILE__) . '/core-jq-sortable.min.js') . "\n";
    echo file_get_contents($core->©dir->n_seps_up(__FILE__) . '/core-jq-bs.min.js') . "\n";
    echo file_get_contents($core->©dir->n_seps_up(__FILE__) . '/core.min.js') . "\n";
    file_put_contents(dirname(__FILE__) . '/core-libs.min.js', trim(ob_get_clean()));
}
コード例 #30
0
ファイル: orders.php プロジェクト: romlg/cms36
 function Show()
 {
     global $lang;
     if (!empty($GLOBALS['_POST'])) {
         $actions = get('actions', '', 'p');
         if ($actions) {
             return $this->{$actions}();
         }
     }
     require_once core('ajax_table');
     $ret['thisname'] = $this->name;
     $ret['params'] = ajax_table(array('columns' => array(array('select' => 'id', 'display' => 'id', 'type' => 'checkbox'), array('select' => 'object_id', 'display' => 'lot_id', 'type' => 'lot'), array('select' => 'flat_id', 'display' => 'flat_id', 'type' => 'flat'), array('select' => 'name', 'display' => 'name'), array('select' => 'date', 'display' => 'date', 'type' => 'date'), array('select' => 'contacts', 'display' => 'contacts')), 'orderby' => 'date desc', 'from' => $this->table, 'where' => '', 'params' => array('page' => $this->name, 'do' => 'show', 'move' => 0), 'click' => 'ID=cb.value', 'dblclick' => 'editItem(id)'), $this);
     return $this->Parse($ret, $this->name . '.tmpl');
 }