示例#1
0
function AdkAdmin()
{
    global $txt, $context, $settings, $adkportal, $boardurl, $adkFolder;
    //Is allowed to manage adkportal
    isAllowedTo('adk_portal');
    //Load my template
    adktemplate('Adk-Admin');
    //Load Adk Language
    adkLanguage('Adk-Admin');
    $subActions = array('view' => 'view', 'adksettings' => 'adksettings', 'adksavesettings' => 'adksavesettings', 'manageicons' => 'manageicons');
    //Set subactions for standalone mode
    if ($adkportal['adk_enable'] == 2) {
        $subActions += array('standalone' => 'SettingsStandAlone', 'save_stand' => 'SaveSettingsStandAlone');
    }
    $context['html_headers'] .= getCss('admin_adkportal');
    $context['html_headers'] .= getJs('admin');
    $context[$context['admin_menu_name']]['tab_data'] = array('title' => $txt['adkadmin_settings'], 'description' => $txt['adkadmin_news_desc'], 'tabs' => array('view' => array('description' => $txt['adkadmin_news_desc'], 'label' => '<img style="vertical-align: middle;" alt="" src="' . $settings['default_theme_url'] . '/images/admin/news.png" />&nbsp;' . $txt['adkadmin_news']), 'adksettings' => array('description' => $txt['adkadmin_setting_desc'], 'label' => '<img style="vertical-align: middle;" alt="" src="' . $settings['default_theme_url'] . '/images/admin/settings.png" />&nbsp;' . $txt['adkadmin_setting']), 'manageicons' => array('description' => $txt['adkadmin_icons_desc'], 'label' => '<img style="vertical-align: middle;" alt="" src="' . $settings['default_theme_url'] . '/images/admin/icons.png" />&nbsp;' . $txt['adkadmin_icons'])));
    //The last thing... print the stand alone menu
    if ($adkportal['adk_enable'] == 2) {
        $context[$context['admin_menu_name']]['tab_data']['tabs']['standalone'] = array('description' => $txt['adkadmin_stand_desc'], 'label' => '<img style="vertical-align: middle;" alt="" src="' . $adkFolder['images'] . '/php.png" />&nbsp;' . $txt['adkadmin_stand']);
    }
    // Follow the sa or just go to View function
    if (!empty($_GET['sa']) && !empty($subActions[$_GET['sa']])) {
        $subActions[@$_GET['sa']]();
    } else {
        $subActions['view']();
    }
}
function getCss($mycss, $autoEcho = true, $noCache = false)
{
    if (!$mycss) {
        return '';
    }
    $str = '';
    if (!is_array($mycss) && strExists($mycss, ',')) {
        $mycss = explode(',', $mycss);
    }
    if (is_array($mycss)) {
        foreach ($mycss as $value) {
            $str .= getCss($value, $autoEcho, $noCache);
        }
    } else {
        if (strExists($mycss, '|')) {
            $ar = explode('|', $mycss);
            $mycss = $ar[0];
            $time = isset($ar[1]) ? '?v=' . $ar[1] : '';
        } else {
            $time = $noCache ? '?v=' . date('Ymd', TIME) : '';
        }
        $str = '<link rel="stylesheet" type="text/css" href="' . (strpos($mycss, './') === 0 ? LOCAL_PUBLIC_PATH . 'css/' : CSS_PATH) . $mycss . '.css' . $time . '" />' . "\n";
    }
    if ($autoEcho) {
        echo $str;
    } else {
        return $str;
    }
}
示例#3
0
文件: menu.php 项目: Nnamso/tbox
 public function index($id = '')
 {
     $this->menu_m = $this->load->model('menu/menu_m');
     $menu = $this->menu_m->getmenu($id);
     if (count($menu) > 0) {
         $css = getCss($menu, 'module');
         $this->data['css'] = $css;
         $this->data['menu'] = $menu;
         // get menu type id
         $options = json_decode($menu->options);
         $menu_id = 0;
         if (isset($options->menu_type)) {
             $menu_id = $options->menu_type;
             // load menu items
             if ($menu_id > 0) {
                 $this->menu_m->_table_name = 'menus';
                 $this->menu_m->db->where('menu_type_id', $menu_id);
                 $items = $this->menu_m->get();
                 if (count($items) == 0) {
                     return false;
                 }
                 $this->data['items'] = $items;
             } else {
                 return false;
             }
         } else {
             return false;
         }
         $this->data['menu_id'] = $menu_id;
         $this->load->view('menu', $this->data);
     }
 }
示例#4
0
function ShowDownloads()
{
    global $context, $smcFunc, $txt, $boardurl, $modSettings, $adkportal, $sourcedir;
    //Load your language or English Language
    adkLanguage('Adk-Downloads');
    //Load Subs-adkdownloads.php
    require_once $sourcedir . '/AdkPortal/Subs-adkdownloads.php';
    //Check fi adkportal is enabled or if you have permissions to manage it
    if ($adkportal['download_enable'] == 0 && !allowedTo('adk_downloads_manage')) {
        fatal_lang_error('adkfatal_this_module_doesnt_exist', false);
    }
    $adkportal['Designeds'] = array('borde' => !empty($adkportal['adkcolor_border']) ? $adkportal['adkcolor_border'] : '#99ABBF', 'fondo' => !empty($adkportal['adkcolor_fondo']) ? $adkportal['adkcolor_fondo'] : '#ffffff', 'titulo' => !empty($adkportal['adkcolor_fonttitle']) ? $adkportal['adkcolor_fonttitle'] : '#ffffff', 'letra' => !empty($adkportal['adkcolor_font']) ? $adkportal['adkcolor_font'] : '#444444', 'link' => !empty($adkportal['adkcolor_link']) ? $adkportal['adkcolor_link'] : '#334466', 'att' => !empty($adkportal['adkcolor_attach']) ? $adkportal['adkcolor_attach'] : '#CEE0F4');
    //Set the subations
    $subActions = array('index' => 'ShowIndexCategories', 'view' => 'AdkViewDownload', 'search' => 'AdkSearchDownloads', 'search2' => 'AdkSearchDownloads2', 'downfile' => 'AdkDownloadFile', 'addnewfile' => 'AddaNewDownload', 'addnewfile2' => 'AddaNewDownload2', 'deletedownload' => 'DeleteDownload', 'editdownload' => 'EditDownload', 'unapprovedownload' => 'UnApproveDownload', 'approvedownload' => 'ApproveDownload', 'saveeditdownload' => 'EditSaveDownload', 'viewstats' => 'AdkViewStats', 'myprofile' => 'AdkViewMyProfile', 'down' => 'DownCat', 'up' => 'UpCat');
    //Load css system
    $context['html_headers'] .= getCss('download_system');
    //Load Template
    adktemplate('Adk-Downloads');
    if (!empty($_GET['sa']) && !empty($subActions[$_GET['sa']])) {
        $subActions[@$_GET['sa']]();
    } elseif (!empty($_REQUEST['cat']) && is_numeric($_REQUEST['cat'])) {
        ShowCatDownload((int) $_REQUEST['cat']);
    } else {
        $subActions['index']();
    }
}
示例#5
0
文件: tweet.php 项目: Nnamso/tbox
 public function index($id = '')
 {
     $this->tweet_m = $this->load->model('tweet/tweet_m');
     $tweet = $this->tweet_m->gettweet($id);
     if (count($tweet) > 0) {
         $css = getCss($tweet, 'module');
         $this->data['css'] = $css;
         $this->data['tweet'] = $tweet;
         $this->load->view('tweet', $this->data);
     }
 }
示例#6
0
文件: tab.php 项目: Nnamso/tbox
 public function index($id = '')
 {
     $this->tab_m = $this->load->model('tab/tab_m');
     $tab = $this->tab_m->getTab($id);
     if (count($tab) > 0) {
         $css = getCss($tab, 'module');
         $this->data['css'] = $css;
         $this->data['tab'] = $tab;
         $this->load->view('index', $this->data);
     }
 }
示例#7
0
文件: popup.php 项目: Nnamso/tbox
 public function index($id = '')
 {
     $this->popup_m = $this->load->model('popup/popup_m');
     $popup = $this->popup_m->getPopup($id);
     if (count($popup) > 0) {
         $css = getCss($popup, 'module');
         $this->data['css'] = $css;
         $this->data['popup'] = $popup;
         $this->load->view('popup', $this->data);
     }
 }
示例#8
0
文件: banner.php 项目: Nnamso/tbox
 public function index($id = null)
 {
     $this->banner_m = $this->load->model('banner/banner_m');
     $banner = $this->banner_m->getBanner($id);
     if (count($banner) > 0) {
         $css = getCss($banner, 'module');
         $this->data['css'] = $css;
         $this->data['banner'] = $banner;
         $this->load->view('banner', $this->data);
     }
 }
示例#9
0
文件: video.php 项目: Nnamso/tbox
 public function index($id = '')
 {
     $this->video_m = $this->load->model('video/video_m');
     $video = $this->video_m->getVideo($id);
     if (count($video) > 0) {
         $css = getCss($video, 'module');
         $this->data['css'] = $css;
         $this->data['video'] = $video;
         $this->load->view('video', $this->data);
     }
 }
示例#10
0
文件: m_slider.php 项目: Nnamso/tbox
 public function index($id = null)
 {
     $this->m_slider_m = $this->load->model('m_slider/m_slider_m');
     $slider = $this->m_slider_m->getSlider($id);
     if (count($slider) > 0) {
         $css = getCss($slider, 'module');
         $this->data['css'] = $css;
         $this->data['slider'] = $slider;
         $this->load->view('m_slider', $this->data);
     }
 }
示例#11
0
文件: m_custom.php 项目: Nnamso/tbox
 public function index($id = '')
 {
     $this->custom_m = $this->load->model('m_custom/m_custom_m');
     $custom = $this->custom_m->getCustom($id);
     if (count($custom) > 0) {
         $css = getCss($custom, 'module');
         $this->data['css'] = $css;
         $this->data['custom'] = $custom;
         $this->load->view('m_custom', $this->data);
     }
 }
示例#12
0
文件: share.php 项目: Nnamso/tbox
 public function index($id = '')
 {
     $this->share_m = $this->load->model('share/share_m');
     $share = $this->share_m->getshare($id);
     if (count($share) > 0) {
         $css = getCss($share, 'module');
         $this->data['css'] = $css;
         $this->data['share'] = $share;
         $this->load->view('share', $this->data);
     }
 }
示例#13
0
文件: likebox.php 项目: Nnamso/tbox
 public function index($id = '')
 {
     $this->likebox_m = $this->load->model('likebox/likebox_m');
     $likebox = $this->likebox_m->getLikebox($id);
     if (count($likebox) > 0) {
         $css = getCss($likebox, 'module');
         $this->data['css'] = $css;
         $this->data['likebox'] = $likebox;
         $this->load->view('likebox', $this->data);
     }
 }
示例#14
0
文件: social.php 项目: Nnamso/tbox
 public function index($id = '')
 {
     $this->social_m = $this->load->model('social/social_m');
     $social = $this->social_m->getSocial($id);
     if (count($social) > 0) {
         $css = getCss($social, 'module');
         $this->data['css'] = $css;
         $this->data['social'] = $social;
         $this->load->view('social', $this->data);
     }
 }
示例#15
0
 public function index($id = '')
 {
     $this->breadcrumbs_m = $this->load->model('breadcrumbs/breadcrumbs_m');
     $breadcrumbs = $this->breadcrumbs_m->getbreadcrumbs($id);
     if (count($breadcrumbs) > 0) {
         $css = getCss($breadcrumbs, 'module');
         $this->data['css'] = $css;
         $this->data['breadcrumbs'] = $breadcrumbs;
         $this->load->view('breadcrumbs', $this->data);
     }
 }
示例#16
0
文件: m_search.php 项目: Nnamso/tbox
 public function index($id = '')
 {
     $this->m_search_m = $this->load->model('m_search/m_search_m');
     $search = $this->m_search_m->getsearch($id);
     if (count($search) > 0) {
         $css = getCss($search, 'module');
         $this->data['css'] = $css;
         $this->data['search'] = $search;
         $this->load->view('m_search', $this->data);
     }
 }
示例#17
0
文件: maps.php 项目: Nnamso/tbox
 public function index($id = '')
 {
     $this->maps_m = $this->load->model('maps/maps_m');
     $maps = $this->maps_m->getMaps($id);
     if (count($maps) > 0) {
         $css = getCss($maps, 'module');
         $this->data['css'] = $css;
         $this->data['maps'] = $maps;
         $this->load->view('maps', $this->data);
     }
 }
示例#18
0
文件: login.php 项目: Nnamso/tbox
 public function index($id = '')
 {
     $this->login_m = $this->load->model('login/login_m');
     $login = $this->login_m->getlogin($id);
     if (count($login) > 0) {
         $css = getCss($login, 'module');
         $this->data['css'] = $css;
         $this->data['login'] = $login;
         $this->load->view('login', $this->data);
     }
 }
示例#19
0
文件: m_cart.php 项目: Nnamso/tbox
 public function index($id = '')
 {
     $this->m_cart_m = $this->load->model('m_cart/m_cart_m');
     $m_cart = $this->m_cart_m->getMCart($id);
     if (count($m_cart) > 0) {
         $items = $this->cart->total_items();
         $this->data['items'] = $items;
         $css = getCss($m_cart, 'module');
         $this->data['css'] = $css;
         $this->data['m_cart'] = $m_cart;
         $this->load->view('m_cart', $this->data);
     }
 }
示例#20
0
文件: image.php 项目: Nnamso/tbox
 public function index($id = '')
 {
     if ((int) $id <= 0) {
         return;
     }
     $this->image_m = $this->load->model('image/image_m');
     $image = $this->image_m->getImage($id);
     if (count($image) > 0) {
         $css = getCss($image, 'module');
         $this->data['css'] = $css;
         $this->data['image'] = $image;
         $this->load->view('image', $this->data);
     }
 }
示例#21
0
 public function index($id = '')
 {
     $this->c_categories_m = $this->load->model('c_categories/c_categories_m');
     $cate = $this->c_categories_m->getCategory($id);
     $category = $this->c_categories_m->getCate();
     $tree_option['0'] = lang('root');
     if (count($cate) > 0) {
         $css = getCss($cate, 'module');
         $this->data['css'] = $css;
         $this->data['category'] = $cate;
         $this->data['categories'] = categoriesToTree($category);
         $this->load->view('c_categories', $this->data);
     }
 }
示例#22
0
function getIndexPage()
{
    $v = getUrlFormVar("v", "lr");
    echo "<html><head><title>GX Djembe Admin</title>\n";
    if ($v != 'merge') {
        echo "<link href=\"//cdn.sencha.com/ext/gpl/4.2.0/resources/css/ext-all.css\" rel=\"stylesheet\" />" . "<script type=\"text/javascript\" charset=\"utf-8\" src=\"//cdn.sencha.com/ext/gpl/4.2.0/ext-all-debug.js\"></script>" . getScript("/js/lang.js") . getScript("/js/main.js") . getScript("/js/song.js") . getScript("/js/sound.js") . getScript("/js/parser.js") . getCss("/js/main.css");
    } else {
        echo '<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>' . getScript("/admin/merge/codemirror.min.js") . getCss("/admin/merge/codemirror.css") . getScript("/admin/merge/mergely.min.js") . getCss("/admin/merge/mergely.css");
    }
    echo getScript("admin." . $v . ".js");
    if ($v != 'merge') {
        echo '<script type="text/javascript">' . "\n _ = App.lang.get;" . "\n Ext.onReady(function() {" . "\n oAdmin = new App.Admin();" . "\n });" . "\n</script>";
    }
    echo "\n</head><body></body></html>";
}
示例#23
0
 public function index($id = '')
 {
     $this->most_article_m = $this->load->model('most_article/most_article_m');
     $most_article = $this->most_article_m->getMostArticle($id);
     if (count($most_article) > 0) {
         $this->data['css'] = getCss($most_article, 'module');
         $this->data['most_article'] = $most_article;
         $options = json_decode($most_article->options);
         if (isset($options->count) && is_numeric($options->count)) {
             $count = $options->count;
         } else {
             $count = 4;
         }
         $this->data['articles'] = $this->most_article_m->getArticles($count);
         $this->load->view('most_article', $this->data);
     }
 }
示例#24
0
function AdkSeoMain()
{
    global $context, $txt, $scripturl, $settings, $boardurl;
    //Set css
    $context['html_headers'] .= getCss('admin_adkportal');
    //Load Basic Info
    isAllowedTo('adk_portal');
    adktemplate('Adk-AdminSeo');
    //Load Adk Language
    adkLanguage('Adk-Admin');
    //What are my subactions?
    $subActions = array('htaccess' => 'AdkCreateHtaccess', 'savehtaccess' => 'AdkSaveHtaccess', 'deletehtaccess' => 'AdkDeleteHtaccess', 'settings' => 'AdkSeoSettings', 'savesettings' => 'AdkSaveSettings', 'robotstxt' => 'AdkCreateRobotstxt', 'saverobots' => 'AdkSaveRobotstxt');
    //Set icons
    $context[$context['admin_menu_name']]['tab_data'] = array('title' => $txt['adkmod_seo_manage'], 'description' => $txt['adkportal_seo_manage_desc'], 'tabs' => array('htaccess' => array('description' => '', 'label' => '<img style="vertical-align: middle;" alt="" src="' . $settings['default_theme_url'] . '/images/admin/htaccess.png" />' . $txt['adkmod_seo_htaccess']), 'settings' => array('description' => '', 'label' => '<img style="vertical-align: middle;" alt="" src="' . $settings['default_theme_url'] . '/images/admin/settings.png" />' . $txt['adkadmin_setting']), 'robotstxt' => array('description' => '', 'label' => '<img style="vertical-align: middle;" alt="" src="' . $settings['default_theme_url'] . '/images/admin/robot.png" />' . $txt['adkmod_seo_robots'])));
    // Follow the sa or just go to View function
    if (!empty($_GET['sa']) && !empty($subActions[$_GET['sa']])) {
        $subActions[@$_GET['sa']]();
    } else {
        $subActions['htaccess']();
    }
}
示例#25
0
function AdkBlocksGeneral()
{
    global $txt, $context, $sourcedir, $boardurl, $settings, $adkFolder;
    //Permisos
    isAllowedTo('adk_portal');
    //Load my template
    adktemplate('Adk-AdminBlocks');
    //Load my language
    adkLanguage('Adk-AdminBlocks');
    $subActions = array('checktemplates' => 'LoadBlocksTemplates', 'newtemplate' => 'createNewTemplate', 'save_template' => 'saveNewTemplate', 'edittemplate' => 'editTemplate', 'save_edit_template' => 'saveEditTemplate', 'deletetemplate' => 'deleteTemplate', 'approve_template' => 'approveTemplate', 'viewblocks' => 'viewblocks', 'settingsblocks' => 'SettingsBlocks', 'savesettingsblocks2' => 'SaveSettingsBlocks2', 'deleteblocks' => 'deleteblocks', 'editblocks' => 'editblocks', 'saveeditblocks' => 'saveeditblocks', 'newblocks' => 'LoadTheNewBlocksToCreate', 'savenewblocks' => 'savenewblocks', 'showeditnews' => 'showeditnews', 'showdeletenews' => 'showdeletenews', 'showsaveeditnews' => 'showsaveeditnews', 'createnews' => 'createnews', 'savecreatenews' => 'savecreatenews', 'uploadblock' => 'uploadblock', 'saveuploadblock' => 'saveuploadblock', 'previewblock' => 'PreviewBlockAdKPortal', 'permissions' => 'PermissionBlock', 'savepermissions' => 'SavePermissionBlock', 'download' => 'DownloadNewBlock', 'add_smf_block' => 'AddSMFPersonalBlock', 'shoutboxdeleteall' => 'DeleteShoutboxMessages');
    //Load CSS
    $context['html_headers'] .= getCss('admin_adkportal');
    $context['html_headers'] .= javaScript_blocks();
    $context['html_headers'] .= getJs('admin');
    $context[$context['admin_menu_name']]['tab_data'] = array('title' => $txt['adkmod_block_manage'], 'description' => $txt['adkblock_first_descrip'], 'tabs' => array('checktemplates' => array('description' => $txt['adkblock_templates_desc'], 'label' => '<img style="vertical-align: middle;" alt="" src="' . $adkFolder['images'] . '/wrench_orange.png" />&nbsp;' . $txt['adkblock_templates']), 'viewblocks' => array('description' => '', 'label' => '<img style="vertical-align: middle;" alt="" src="' . $settings['default_theme_url'] . '/images/admin/blocks.png" />&nbsp;' . $txt['adkmod_block_title']), 'settingsblocks' => array('description' => $txt['adkblock_settings_desc'], 'label' => '<img style="vertical-align: middle;" alt="" src="' . $adkFolder['images'] . '/admin.png" />&nbsp;' . $txt['adkmod_block_settings']), 'newblocks' => array('description' => $txt['adkblock_newblocks_desc'], 'label' => '<img style="vertical-align: middle;" alt="" src="' . $settings['default_theme_url'] . '/images/admin/createblock.png" />&nbsp;' . $txt['adkmod_block_add']), 'createnews' => array('description' => $txt['adkblock_news_desc'], 'label' => '<img style="vertical-align: middle;" alt="" src="' . $settings['default_theme_url'] . '/images/admin/createnews.png" />&nbsp;' . $txt['adkmod_block_add_news']), 'download' => array('description' => $txt['adkblock_download_personal_desc'], 'label' => '<img style="vertical-align: middle;" alt="" src="' . $adkFolder['images'] . '/drive_add.png" />&nbsp;' . $txt['adkmod_block_download'])));
    // Follow the sa or just go to View function
    if (!empty($_GET['sa']) && !empty($subActions[$_GET['sa']])) {
        $subActions[@$_GET['sa']]();
    } else {
        $subActions['checktemplates']();
    }
}
示例#26
0
文件: m_product.php 项目: Nnamso/tbox
 public function index($id = '')
 {
     $this->m_product_m = $this->load->model('m_product/m_product_m');
     $m_product = $this->m_product_m->getM_product($id);
     if (count($m_product) > 0) {
         $css = getCss($m_product, 'module');
         $this->data['css'] = $css;
         $this->data['m_product'] = $m_product;
         $options = json_decode($m_product->options);
         if (isset($options->count) && is_numeric($options->count)) {
             $count = $options->count;
         } else {
             $count = 8;
         }
         if (isset($options->show_product) && $options->show_product != '') {
             $products = $this->m_product_m->getProducts($count, $options->show_product);
         } else {
             $products = array();
         }
         $this->data['products'] = $products;
         $this->load->view('m_product', $this->data);
     }
 }
示例#27
0
function AdkModules()
{
    global $context, $txt, $settings, $boardurl, $adkFolder;
    isAllowedTo('adk_portal');
    adktemplate('Adk-AdminModules');
    adkLanguage('Adk-AdminModules');
    $subActions = array('intro' => 'introAdk', 'viewadminpages' => 'viewadminpages', 'createpages' => 'createpages', 'savecreatedpages' => 'savecreatedpages', 'editpages' => 'editpages', 'saveeditpages' => 'saveeditpages', 'deletepages' => 'deletepages', 'uploadanyimage' => 'UploadNewImage', 'saveuploadimg' => 'SaveUploadNewImage', 'manageimagesadk' => 'ManageImagesAdk', 'deleteimagesadk' => 'DeleteImagesAdk', 'contact' => 'ContactAdmin', 'save_contact' => 'SaveContactAdmin', 'enable_page_menu' => 'EnablePageMenu', 'enable_comments' => 'EnableComments', 'enable_notifications' => 'EnableNotifications');
    $context[$context['admin_menu_name']]['tab_data'] = array('title' => $txt['adkmodules_modules_settings'], 'description' => $txt['adkmodules_first_modules'], 'tabs' => array('intro' => array('description' => $txt['adkmodules_first_modules'], 'label' => '<img style="vertical-align: middle;" alt="" src="' . $settings['default_theme_url'] . '/images/admin/intro.png" /> ' . $txt['adkmod_modules_intro']), 'viewadminpages' => array('description' => $txt['adkmodules_second_modules'], 'label' => '<img style="vertical-align: middle;" alt="" src="' . $settings['default_theme_url'] . '/images/admin/pages.png" /> ' . $txt['adkmod_modules_pages']), 'contact' => array('description' => $txt['adkmodules_desc_contacto'], 'label' => '<img style="vertical-align: middle;" alt="" src="' . $adkFolder['images'] . '/newmsg.png" /> ' . $txt['adkmod_modules_contacto']), 'uploadanyimage' => array('description' => $txt['adkmodules_tirth_modules'], 'label' => '<img style="vertical-align: middle;" alt="" src="' . $settings['default_theme_url'] . '/images/admin/imagesadvanced.png" /> ' . $txt['adkmod_modules_images']), 'manageimagesadk' => array('description' => $txt['adkmodules_fourth_modules'], 'label' => '<img style="vertical-align: middle;" alt="" src="' . $settings['default_theme_url'] . '/images/admin/images.png" /> ' . $txt['adkmod_modules_manage_images'])));
    // Hooks menu integrations
    call_integration_hook('integrate_modules_menu', array(&$context[$context['admin_menu_name']]['tab_data']));
    // Hooks sa integration
    call_integration_hook('modules_subactions', array(&$subActions));
    //Hooks pre includes
    adkportal_include_hooks('integrate_pre_include_modules');
    $context['html_headers'] .= getCss('admin_adkportal');
    $context['html_headers'] .= getJs('admin');
    // Follow the sa or just go to View function
    if (!empty($_GET['sa']) && !empty($subActions[$_GET['sa']])) {
        $subActions[@$_GET['sa']]();
    } else {
        $subActions['intro']();
    }
}
示例#28
0
文件: m_contact.php 项目: Nnamso/tbox
 public function index($id = '')
 {
     $this->load->helper('url');
     $this->load->helper('cms');
     $this->lang->load('contact');
     $this->m_contact_m = $this->load->model('m_contact/m_contact_m');
     $this->data['forms'] = $this->m_contact_m->getFormField('contact');
     $contact = $this->m_contact_m->getContact($id);
     if ($email = $this->input->post('email')) {
         $this->load->library('form_validation');
         if (count($contact) > 0) {
             $this->form_validation->set_rules('subject', lang('subject'), 'trim|required|min_length[2]|max_length[200]');
             $this->form_validation->set_rules('email', lang('email'), 'trim|required|valid_email');
             if ($this->form_validation->run() == TRUE) {
                 $name = $this->input->post('name');
                 $subject = $this->input->post('subject');
                 $message = $this->input->post('message');
                 // send email
                 $config = array('mailtype' => 'html');
                 $this->load->library('email', $config);
                 $this->email->from($email, getSiteName(config_item('site_name')));
                 $this->email->to($contact->email);
                 if ($contact->copy == 1) {
                     $this->email->cc($email);
                 }
                 if ($contact->subject != '' && strpos($contact->subject, '{content}') > 0) {
                     // add subject
                     $this->email->subject(str_replace('{content}', $subject, $contact->subject));
                 } else {
                     $this->email->subject($subject);
                 }
                 if ($contact->message != '' && strpos($contact->message, '{content}') > 0) {
                     // add message
                     $message = str_replace('{content}', $message, $contact->message);
                 }
                 $fields = $this->input->post('fields');
                 $add_info = '';
                 if (is_array($fields)) {
                     foreach ($fields as $key => $val) {
                         $add_info .= $add_info . '<p>' . $key . ': ' . $val . '</p>';
                     }
                 }
                 $this->email->message($add_info . $message);
                 if ($this->email->send()) {
                     $this->data['msg'] = lang('contact_send_email_success_msg');
                 } else {
                     $this->data['error'] = lang('contact_send_email_error_msg');
                     $this->data['data'] = $this->input->post();
                 }
             } else {
                 $this->data['error'] = validation_errors();
                 $this->data['data'] = $this->input->post();
             }
         } else {
             $this->data['error'] = lang('contact_not_found_msg');
         }
     }
     if (count($contact) > 0) {
         $css = getCss($contact, 'module');
         $this->data['contact'] = $contact;
         $this->data['css'] = $css;
         $this->load->view('m_contact', $this->data);
     }
 }
示例#29
0
function getParams()
{
    $params = [];
    parse_str($_SERVER['QUERY_STRING'], $params);
    $params = (object) $params;
    $params->mode = $params->mode ?: 'min';
    $params->build = !$params->build || '_' === $params->build ? ['normalize', 'h5bp', 'fit', 'custom'] : array_unique(array_filter(explode(',', preg_replace('#(\\.\\d+)?(\\.css)?#', '', $params->build))));
    return $params;
}
/**
 * @param   string      $file
 * @param   string      $min
 * @return  string|boolean
 */
function getCss($file, $mode = 'min')
{
    $file = (is_dir('css') ? '.' : '..') . '/css/' . $file;
    $css = is_file($file) || is_file($file .= '.css') ? file_get_contents($file) : false;
    return $css && 'min' === $mode ? compressCss($css) : $css;
}
# generate the output:
call_user_func(function () {
    $params = getParams();
    $nfo = '/*!' . "\n" . ' * @link css3base.com/build/' . implode(',', $params->build) . "\n" . ' * @time ' . date(DATE_W3C) . "\n" . ' */';
    $output = [];
    foreach ($params->build as $n) {
        $css = ($css = getCss($n, $params->mode)) ? array_push($output, $css) : null;
    }
    $output = array_filter($output);
    echo $nfo . "\n\n" . implode("\n\n\n", $output) . "\n\n";
});
示例#30
0
function javaScript_blocks()
{
    global $boardurl, $txt, $user_info, $settings, $context, $current_load, $adkFolder;
    static $count = 0;
    if ($count > 0) {
        return '';
    }
    $js = getCss('blocks');
    $js .= '<script type="text/javascript"><!-- // --><![CDATA[
			var smf_adk_url = "' . $adkFolder['mainurl'] . '/";
			var smf_shoutbox_text_sending = "' . $txt['adkmod_shoutbox_sending'] . '";
			var smf_shoutbox_shout_it = "' . $txt['adkmod_shoutbox_shout_it'] . '";
			var smf_shoutbox_fill = "' . $txt['adkmod_shoutbox_all_field'] . '";
		// ]]></script>
		<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
			function adkcollapse(id,span)
			{
				var hide = new Array();
				hide[1] = "adk_left_' . $current_load[0] . '_' . $current_load[1] . '";
				hide[2] = "adk_right_' . $current_load[0] . '_' . $current_load[1] . '";
				if (id == 1) {var leftright = "left";}
				else {var leftright = "right";}
				mode = document.getElementById(hide[id]).style.display == "" ? 0 : 1;' . ($user_info['is_guest'] ? '
				document.cookie = hide[id] + "=" + (mode ? 0 : 1);' : '
				smf_setThemeOption(hide[id], mode ? 0 : 1, null, "' . $context['session_id'] . '");') . '
				document.getElementById(span).innerHTML = (mode ? "<img alt=\\"' . $txt['adkmod_collapse'] . '\\" title=\\"' . $txt['adkmod_collapse'] . '\\" src=\\"' . $adkFolder['images'] . '/collapse_" + leftright + ".png\\" />" : "<img alt=\\"' . $txt['adkmod_expand'] . '\\" title=\\"' . $txt['adkmod_expand'] . '\\" src=\\"' . $adkFolder['images'] . '/expand_" + leftright + ".png\\" />"); 						
				document.getElementById(hide[id]).style.display = mode ? "" : "none";
			}
			function adkBlock(id,img_id)
			{
				var hide = new Array();
				hide[id] = "adk_block_"+ id;
				mode = document.getElementById(hide[id]).style.display == "" ? 0 : 1;' . ($user_info['is_guest'] ? '
				document.cookie = hide[id] + "=" + (mode ? 0 : 1);' : '
				smf_setThemeOption(hide[id], mode ? 0 : 1, null, "' . $context['session_id'] . '");') . '
				document.getElementById(img_id).src = (mode ? "' . $settings['images_url'] . '/collapse.gif" : "' . $settings['images_url'] . '/expand.gif");
				document.getElementById(hide[id]).style.display = mode ? "" : "none";
			}		
		// ]]></script>';
    $count++;
    return $js;
}