static function get_forinstall() { if (!defined('APATH')) { return null; } $installed = mapi_list('installed_templates', array('env' => 'frontend')); $for_install = array(); $tdir = APATH . '/templates/'; $tdir_content = scandir($tdir); if (sizeof($tdir_content) > 0) { foreach ($tdir_content as $inst_candidate) { if (!in_array($inst_candidate, $installed) && MExtension::check_template($inst_candidate)) { $for_install[] = $inst_candidate; } } } return $for_install; }
static function get_extensions($type) { $extensions = array(); if (!in_array($type, self::$types)) { return $extensions; } switch ($type) { case 'module': $extensions = mapi_list('installed_modules', array('env' => 'frontend')); break; case 'template': $extensions = mapi_list('installed_templates', array('env' => 'frontend')); break; case 'widget': $extensions = mapi_list('installed_widgets', array('env' => 'frontend')); break; } return $extensions; }
static function get_categories() { return mapi_list('categories'); }
static function get_contents() { return mapi_list('contents'); }
<?php // no direct access to this file defined('DACCESS') or die; ?> <div class="m-content-header"> <h3 class="hidden-xs hidden-sm"><span class="glyphicon glyphicon-plus"></span> Add new content</h3> </div> <?php $crumbs = array('contents' => array('title' => 'Contents', 'link' => 'index.php?module=mcontent&task=content_list'), 'content_add' => array('title' => 'Add new content')); $licenses = mapi_list('licenses', array('status' => 'enabled')); $SysConf = new MSettings(); if (isset($SysConf::$location)) { $DefaultLoc = $SysConf::$location; } else { $DefaultLoc = $data->address; } ?> <?php MHTML::breadcrumb($crumbs); ?> <?php MMessaging::show(); ?> <form method="post">
<?php // no direct access to this file defined('DACCESS') or die; ?> <div class="m-content-header"> <h3 class="hidden-xs hidden-sm"><span class="glyphicon glyphicon-plus"></span> Add a new page</h3> </div> <?php $crumbs = array('pages' => array('title' => 'Pages', 'link' => 'index.php?module=mpage&task=page_list'), 'pages_add' => array('title' => 'Add a new page')); $contents = mapi_list('contents', array('status' => 'enabled')); $categories = mapi_list('categories', array('status' => 'enabled')); $modules = mapi_list('modules', array('status' => 'enabled', 'env' => 'frontend')); ?> <?php MHTML::breadcrumb($crumbs); ?> <?php MMessaging::show(); ?> <form method="post"> <input type="hidden" name="mapi_csrf" id="mapi_csrf" value="<?php MPut::_html_attr(mapi_csrf_value()); ?> " />
?> <div class="m-content-header"> <h3 class="hidden-xs hidden-sm"><span class="glyphicon glyphicon-edit"></span> <?php MPut::_title($data->title); ?> <span class="badge"><?php MPut::_id($data->hits); ?> </span></h3> </div> <?php $crumbs = array('contents' => array('title' => 'Contents', 'link' => 'index.php?module=mcontent&task=content_list'), 'this_content' => array('title' => $data->title)); $licenses = mapi_list('licenses', array('status' => 'enabled')); $categories = mapi_list('categories', array('status' => 'enabled')); ?> <?php MHTML::breadcrumb($crumbs); ?> <?php MMessaging::show(); ?> <form method="post" action="index.php?module=mcontent&task=content_edit&object=<?php MPut::_numeric($data->id); ?> ">
static function get_users() { return mapi_list('users'); }
defined('DACCESS') or die; ?> <div class="m-content-header"> <h3 class="hidden-xs hidden-sm"><span class="glyphicon glyphicon-edit"></span> <?php MPut::_title($data->title); ?> </h3> </div> <?php $crumbs = array('pages' => array('title' => 'Pages', 'link' => 'index.php?module=mpage&task=page_list'), 'this_page' => array('title' => $data->title)); $contents = mapi_list('contents', array('status' => 'enabled')); $categories = mapi_list('categories', array('status' => 'enabled')); $modules = mapi_list('modules', array('status' => 'enabled', 'env' => 'frontend')); $menus = mapi_list('menus', array('status' => 'enabled')); ?> <?php MHTML::breadcrumb($crumbs); ?> <?php MMessaging::show(); ?> <form method="post"> <input type="hidden" name="mapi_csrf" id="mapi_csrf" value="<?php MPut::_html_attr(mapi_csrf_value()); ?>
<?php // no direct access to this file defined('DACCESS') or die; ?> <div class="m-content-header"> <h3 class="hidden-xs hidden-sm"><span class="glyphicon glyphicon-user"></span> Users list <small>( <a href="index.php?module=muser&task=user_add">Add new</a> )</small></h3> </div> <?php $crumbs = array('users' => array('title' => 'Users')); $groups = mapi_list('user_groups'); ?> <?php MHTML::breadcrumb($crumbs); ?> <?php MMessaging::show(); ?> <?php if (sizeof($data) > 0 && sizeof($groups) > 0) { foreach ($data as $user) { if ($user->group_id) { foreach ($groups as $group) { if ($user->group_id == $group->id) { $user->group = $group->title; }
public function get_media($default = false) { if (!$default) { if ($this->id) { return mapi_list('content_media', array('external_id' => $this->id, 'orderby' => array('column' => 'id'))); } else { return array(); } } else { $media = ORM::for_table('content_media')->where('external_id', intval($this->id))->where('default_media', 1)->find_one(); return $media; } }
static function get_menus() { return mapi_list('menus'); }
static function get_pages() { return mapi_list('pages'); }