当前位置: 首页>>代码示例>>PHP>>正文


PHP gpOutput类代码示例

本文整理汇总了PHP中gpOutput的典型用法代码示例。如果您正苦于以下问题:PHP gpOutput类的具体用法?PHP gpOutput怎么用?PHP gpOutput使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了gpOutput类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: ShowRecent

 function ShowRecent()
 {
     global $langmessage;
     $page->css_admin[] = '/include/css/addons.css';
     //for hmargin css pre gpEasy 3.6
     echo '<h2 class="hmargin">';
     $label = gpOutput::SelectText('Blog');
     echo common::Link('Special_Blog', $label);
     echo ' &#187; ';
     echo common::Link('Admin_Blog', $langmessage['configuration']);
     echo ' <span>|</span> ';
     echo common::Link('Admin_BlogCategories', 'Categories');
     echo ' <span>|</span> ';
     echo gpOutput::SelectText('Comments');
     echo '</h2>';
     echo '<table style="width:100%" class="bordered">';
     echo '<tr><th>';
     echo 'Comment';
     echo '</th><th>';
     echo 'Time / Website';
     echo '</th><th>';
     echo 'Options';
     echo '</th></tr>';
     uasort($this->cache, array('SimpleBlogComments', 'Sort'));
     foreach ($this->cache as $comment) {
         $this->OutputComment($comment);
     }
     echo '</table>';
 }
开发者ID:Knuzen,项目名称:gpEasy-CMS,代码行数:29,代码来源:AdminComments.php

示例2: Run

 /**
  *  Print all categories and their contents on gadget
  *
  */
 function Run()
 {
     echo '<div class="simple_blog_gadget"><div>';
     echo '<span class="simple_blog_gadget_label">';
     echo gpOutput::GetAddonText('Categories');
     echo '</span>';
     echo '<ul>';
     foreach ($this->categories as $catdata) {
         if (!$catdata['visible']) {
             continue;
             //skip hidden categories
         }
         echo '<li>';
         $sum = count($catdata['posts']);
         echo '<a class="blog_gadget_link">' . $catdata['ct'] . ' (' . $sum . ')</a>';
         if ($sum) {
             echo '<ul class="nodisplay">';
             foreach ($catdata['posts'] as $post_index => $post_title) {
                 echo '<li>';
                 echo common::Link('Special_Blog', $post_title, 'id=' . $post_index);
                 echo '</li>';
             }
             echo '</ul>';
         }
         echo '</li>';
     }
     echo '</ul>';
     echo '</div></div>';
 }
开发者ID:rizub4u,项目名称:gpEasy-CMS,代码行数:33,代码来源:CategoriesGadget.php

示例3: Check

 function Check($passed)
 {
     $message = gpOutput::SelectText('Sorry, your answer to the verification challenge was incorrect. Please try again.');
     if (empty($_POST['asm_1']) || empty($_POST['asm_2']) || empty($_POST['asm_3'])) {
         message($message . ' (1)');
         return false;
     }
     $operator_key = $_POST['asm_2'];
     if (!isset($this->operators[$operator_key])) {
         message($message . ' (2)');
         return false;
     }
     switch ($operator_key) {
         case 1:
             $result = $_POST['asm_1'] + $_POST['asm_3'];
             break;
         case 2:
             $result = $_POST['asm_1'] - $_POST['asm_3'];
             break;
         case 3:
             $result = $_POST['asm_1'] / $_POST['asm_3'];
             break;
         case 4:
             $result = $_POST['asm_1'] * $_POST['asm_3'];
             break;
     }
     $compare = $_POST['asm_4'];
     //message('result: '.$result.' vs submitted: '.$compare);
     if ($compare != $result) {
         message($message . ' (3)');
         return false;
     }
     //message('passed');
     return $passed;
 }
开发者ID:VTAMAGNO,项目名称:gpEasy-CMS,代码行数:35,代码来源:AntiSpamMath.php

示例4: UpdateOutputTest

 /**
  * Very rough integration test of the updater
  * Passes if no errors are thrown
  * Also defines $page for subsequent tests
  *
  */
 function UpdateOutputTest()
 {
     global $page;
     ob_start();
     includeFile('tool/update.php');
     $page = new update_class();
     gpOutput::HeadContent();
     includeFile('install/template.php');
     ob_get_clean();
 }
开发者ID:jozefkrz,项目名称:gpEasy-CMS,代码行数:16,代码来源:UpdateTest.php

示例5: EditGalleries

 function EditGalleries()
 {
     global $page, $langmessage;
     $page->head_js[] = '/include/js/special_galleries.js';
     $page->css_admin[] = '/include/css/edit_gallery.css';
     echo '<h2>';
     echo common::Link('Special_Galleries', gpOutput::ReturnText('galleries'));
     echo ' &#187; ' . $langmessage['administration'];
     echo '</h2>';
     echo '<p>';
     echo $langmessage['DRAG-N-DROP-DESC2'];
     echo '</p>';
     $this->EditableArea();
 }
开发者ID:VTAMAGNO,项目名称:gpEasy-CMS,代码行数:14,代码来源:admin_galleries.php

示例6: GetContent

 function GetContent()
 {
     $this->GetGpxContent();
     if (!empty($this->non_admin_content)) {
         echo '<div class="filetype-text cf">';
         //echo '<div id="gpx_content" class="filetype-text">'; //id="gpx_content" conflicts with admin content
         echo $this->non_admin_content;
         echo '</div>';
     }
     echo '<div id="gpAfterContent">';
     gpOutput::Get('AfterContent');
     gpPlugin::Action('GetContent_After');
     echo '</div>';
 }
开发者ID:rizub4u,项目名称:gpEasy-CMS,代码行数:14,代码来源:admin_display.php

示例7: Response

 /**
  * Handle HTTP responses made with $_REQUEST['req'] = json (when <a ... data-cmd="gpajax">)
  * Sends JSON object to client
  *
  */
 static function Response()
 {
     global $page;
     if (!is_array($page->ajaxReplace)) {
         die;
     }
     if (!isset($_REQUEST['jsoncallback'])) {
         die('Invalid Request: jsoncallback not set');
     }
     //gadgets may be using gpajax/json request/responses
     gpOutput::TemplateSettings();
     gpOutput::PrepGadgetContent();
     echo gpAjax::Callback($_REQUEST['jsoncallback']);
     echo '([';
     //output content
     if (!empty($_REQUEST['gpx_content'])) {
         switch ($_REQUEST['gpx_content']) {
             case 'gpabox':
                 gpAjax::JsonDo('admin_box_data', '', $page->contentBuffer);
                 break;
         }
     } elseif (in_array('#gpx_content', $page->ajaxReplace)) {
         $replace_id = '#gpx_content';
         if (isset($_GET['gpreqarea'])) {
             $replace_id = '#' . $_GET['gpreqarea'];
         }
         ob_start();
         $page->GetGpxContent(true);
         $content = ob_get_clean();
         gpAjax::JsonDo('replace', $replace_id, $content);
     }
     //other areas
     foreach ($page->ajaxReplace as $arguments) {
         if (is_array($arguments)) {
             $arguments += array(0 => '', 1 => '', 2 => '');
             gpAjax::JsonDo($arguments[0], $arguments[1], $arguments[2]);
         }
     }
     //always send messages
     ob_start();
     echo GetMessages(false);
     $content = ob_get_clean();
     if (!empty($content)) {
         gpAjax::JsonDo('messages', '', $content);
     }
     echo ']);';
     die;
 }
开发者ID:jozefkrz,项目名称:gpEasy-CMS,代码行数:53,代码来源:ajax.php

示例8: Heading

 /**
  * @param string $current
  */
 function Heading($current)
 {
     global $langmessage;
     $options = array('Admin_Blog' => 'Posts', 'Admin_BlogConfig' => $langmessage['configuration'], 'Admin_BlogCategories' => 'Categories', 'Admin_BlogComments' => gpOutput::SelectText('Comments'));
     $links = array();
     foreach ($options as $slug => $label) {
         if ($slug == $current) {
             $links[] = $label;
         } else {
             $links[] = common::Link($slug, $label);
         }
     }
     echo common::Link('Admin_Blog', 'New Blog Post', 'cmd=new_form', ' class="gpsubmit" style="float:right"');
     echo '<h2 class="hmargin">';
     $label = gpOutput::SelectText('Blog');
     echo common::Link('Special_Blog', $label);
     echo ' &#187; ';
     echo implode('<span>|</span>', $links);
     echo '</h2>';
 }
开发者ID:Typesetter,项目名称:Simple-Blog,代码行数:23,代码来源:Admin.php

示例9: special_map

 function special_map()
 {
     global $page, $langmessage, $config;
     /*
     An xml site map will not show any of the pages from dynamic add-ons
     ... which is precisely what the regular sitemap shows
     */
     if (isset($_GET['xml'])) {
         $this->xml();
         return;
     }
     $this->MultiSiteData();
     echo '<div class="sitemap_xml">';
     echo common::Link('Special_Site_Map', 'XML', 'xml');
     echo '</div>';
     echo '<h2>';
     echo gpOutput::ReturnText('site_map');
     echo '</h2>';
     gpOutput::GetFullMenu();
 }
开发者ID:rizub4u,项目名称:gpEasy-CMS,代码行数:20,代码来源:special_map.php

示例10: Upgrade_234

 /**
  * Update the gp_index, gp_titles and menus so that special pages can be renamed
  *
  */
 function Upgrade_234()
 {
     global $gp_index, $gp_titles, $gp_menu, $config, $dataDir;
     includeFile('tool/gpOutput.php');
     $special_indexes = array();
     $new_index = array();
     $new_titles = array();
     foreach ($gp_index as $title => $index) {
         $info = $gp_titles[$index];
         $type = common::SpecialOrAdmin($title);
         if ($type === 'special') {
             $special_indexes[$index] = strtolower($title);
             $index = strtolower($title);
             $info['type'] = 'special';
             //some older versions didn't maintain this value well
         }
         $new_index[$title] = $index;
         $new_titles[$index] = $info;
     }
     $gp_titles = $new_titles;
     $gp_index = $new_index;
     //update gp_menu
     $gp_menu = $this->FixMenu($gp_menu, $special_indexes);
     //save pages
     if (!admin_tools::SavePagesPHP()) {
         return;
     }
     $config['gpversion'] = '2.3.4';
     admin_tools::SaveConfig();
     //update alt menus
     if (isset($config['menus']) && is_array($config['menus'])) {
         foreach ($config['menus'] as $key => $value) {
             $menu_file = $dataDir . '/data/_menus/' . $key . '.php';
             if (gpFiles::Exists($menu_file)) {
                 $menu = gpOutput::GetMenuArray($key);
                 $menu = $this->FixMenu($menu, $special_indexes);
                 gpFiles::SaveData($menu_file, 'menu', $menu);
             }
         }
     }
 }
开发者ID:VTAMAGNO,项目名称:gpEasy-CMS,代码行数:45,代码来源:upgrade.php

示例11: Run

 /**
  *  Print all archives and their contents on gadget
  *
  */
 function Run()
 {
     if (!count($this->archives)) {
         return;
     }
     echo '<div class="simple_blog_gadget"><div>';
     echo '<span class="simple_blog_gadget_label">';
     echo gpOutput::GetAddonText('Archives');
     echo '</span>';
     $prev_year = false;
     echo '<ul>';
     foreach ($this->archives as $ym => $posts) {
         $y = floor($ym / 100);
         $m = $ym % 100;
         if ($y != $prev_year) {
             if ($prev_year !== false) {
                 echo '</li>';
             }
             echo '<li><div class="simple_blog_gadget_year">' . $y . '</div>';
             $prev_year = $y;
         }
         $sum = count($posts);
         if (!$sum) {
             continue;
         }
         echo '<ul>';
         echo '<li><a class="blog_gadget_link">' . $this->months[$m - 1] . ' (' . $sum . ')</a>';
         echo '<ul class="simple_blog_category_posts nodisplay">';
         foreach ($posts as $post_index => $post_title) {
             echo '<li>';
             echo common::Link('Special_Blog', $post_title, 'id=' . $post_index);
             echo '</li>';
         }
         echo '</ul>';
         echo '</li>';
         echo '</ul>';
     }
     echo '</li></ul>';
     echo '</div></div>';
 }
开发者ID:rizub4u,项目名称:gpEasy-CMS,代码行数:44,代码来源:ArchivesGadget.php

示例12: ShowCategories

 function ShowCategories()
 {
     echo '<h2>';
     echo gpOutput::GetAddonText('Categories');
     echo '</h2>';
     //$gadgetFile = $this->addonPathData.'/gadget_categories.php';
     echo '<ul>';
     foreach ($this->categories as $catindex => $catname) {
         //skip hidden categories
         if (SimpleBlogCommon::AStrValue('categories_hidden', $catindex)) {
             continue;
         }
         $cat_posts_str =& SimpleBlogCommon::$data['category_posts_' . $catindex];
         $count = substr_count($cat_posts_str, '>');
         if (!$count) {
             continue;
         }
         echo '<li>';
         echo SimpleBlogCommon::CategoryLink($catindex, $catname, $catname . ' (' . $count . ')');
         echo '</li>';
     }
     echo '</ul>';
 }
开发者ID:GedionChang,项目名称:gpEasy-CMS,代码行数:23,代码来源:SimpleBlogCategories.php

示例13: SimpleBlogCategories

 function SimpleBlogCategories()
 {
     global $addonPathData;
     SimpleBlogCommon::AddCSS();
     $gadget_file = $addonPathData . '/gadget_categories.php';
     $content = '';
     if (file_exists($gadget_file)) {
         $content = file_get_contents($gadget_file);
     }
     //fix edit links
     if (strpos($content, 'simple_blog_gadget_label')) {
         new SimpleBlogCommon();
         $content = file_get_contents($gadget_file);
     }
     if (empty($content)) {
         return;
     }
     echo '<div class="simple_blog_gadget"><div>';
     echo '<span class="simple_blog_gadget_label">';
     echo gpOutput::GetAddonText('Categories');
     echo '</span>';
     echo $content;
     echo '</div></div>';
 }
开发者ID:GedionChang,项目名称:gpEasy-CMS,代码行数:24,代码来源:CategoriesGadget.php

示例14: GetAdminLink

 function GetAdminLink()
 {
     trigger_error('deprecated functions');
     gpOutput::GetAdminLink();
 }
开发者ID:jozefkrz,项目名称:gpEasy-CMS,代码行数:5,代码来源:display.php

示例15: GetNoMenus

 /**
  * Get an array of titles that is not represented in any of the menus
  *
  */
 function GetNoMenus()
 {
     global $gp_index;
     //first get all titles in a menu
     $menus = $this->GetAvailMenus('menu');
     $all_keys = array();
     foreach ($menus as $menu_id => $label) {
         $menu_array = gpOutput::GetMenuArray($menu_id);
         $keys = array_keys($menu_array);
         $all_keys = array_merge($all_keys, $keys);
     }
     $all_keys = array_unique($all_keys);
     //then check $gp_index agains $all_keys
     foreach ($gp_index as $title => $index) {
         if (in_array($index, $all_keys)) {
             continue;
         }
         $avail[] = $title;
     }
     return $avail;
 }
开发者ID:rizub4u,项目名称:gpEasy-CMS,代码行数:25,代码来源:admin_menu_new.php


注:本文中的gpOutput类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。