linea21-core
[ class tree: linea21-core ] [ index: linea21-core ] [ all elements ]

Source for file _link_to_pages.php

Documentation is available at _link_to_pages.php

  1. <?php
  2. /**
  3.  * @package linea21.core
  4.  * @subpackage admin
  5.  * @author Simon Georget <simon@linea21.com>
  6.  * @version $id SVN
  7.  * @access public
  8.  * @license http://opensource.org/licenses/gpl-3.0.html
  9.  */
  10.  
  11. header('Content-Type: text/html; charset=utf-8');
  12.  
  13. // rawurlencode() is needed. If not set, generate a JS error in CKEDITOR link plugin
  14. function encodeURIComponent$str ){
  15.  
  16.     $revert array('%21'=>'!''%2A'=>'*''%27'=>"'"'%28'=>'(''%29'=>')');
  17.     return strtr(rawurlencode($str)$revert);
  18.  
  19. }
  20.  
  21. include_once('../config/define.php');
  22.  
  23. //////////// Check Droits utilisateur ////////////
  24. if ($l21auth->isSimpleUser()) ReloadIndex('admin');
  25. ////////////
  26.  
  27. include_once('../languages/' U_L '/lang_common.' CHARSET '.php');
  28.  
  29.  
  30. $a array();
  31.  
  32. // 
  33. // Caution :  use 'rewrite_override' option if you don't want to use MOD_REWRITE syntax
  34.  
  35.  
  36. // Getting News
  37. ///////////////////
  38. include_once('../news/' SQL '.inc.php');
  39. $data $sql_object->DBSelect(SQL_getNewsList(0999'P'));
  40.  
  41. foreach ($data as &$el{
  42.     
  43.     $module encodeURIComponent(mb_ucfirst(_t('name''news_module')' : '));
  44.     $name encodeURIComponent($el['news_title']);
  45.     $link HrefMaker(array('rub' => $GLOBALS['links'][U_L]['news']['linkvalue']'id' => $el['news_id']'name' => $el['news_title']'amp_no_conversion'=> true));
  46.     
  47.     $tmp array($module $nameSITE_ROOT_URL.'public/'.$link);
  48.     array_push($a$tmp);
  49. }
  50.  
  51.  
  52. // Getting Pages
  53. ///////////////////
  54. include_once('../page/' SQL '.inc.php');
  55. $data $sql_object->DBSelect(SQL_getPagesList(0999'P'));
  56.  
  57. foreach ($data as &$el{
  58.     
  59.     $module encodeURIComponent(mb_ucfirst(_t('name''page_module')' : '));
  60.     $name encodeURIComponent($el['page_title']);
  61.     $link HrefMaker(array('rub' => $GLOBALS['links'][U_L]['page']['linkvalue']'id' => $el['page_id']'name' => $el['page_title']'amp_no_conversion'=> true));
  62.     
  63.     $tmp array($module $nameSITE_ROOT_URL.'public/'.$link);
  64.     array_push($a$tmp);
  65. }
  66.  
  67. // Getting Publications
  68. ///////////////////
  69. include_once('../publication/' SQL '.inc.php');
  70. $data $sql_object->DBSelect(SQL_getPublicationList(0999));
  71.  
  72. foreach ($data as &$el{
  73.  
  74.     $module encodeURIComponent(mb_ucfirst(_t('name''publication_module')' : '));
  75.     $name encodeURIComponent($el['complete_publi_title']);
  76.     $link HrefMaker(array('rub' => $GLOBALS['links'][U_L]['publication']['linkvalue']'id' => $el['publi_id']'name' => $el['complete_publi_title']'amp_no_conversion'=> true));
  77.  
  78.     $tmp array($module $nameSITE_ROOT_URL.'public/'.$link);
  79.     array_push($a$tmp);
  80. }
  81.  
  82. // Getting Newsletters
  83. ///////////////////
  84. include_once('../newsletter/' SQL '.inc.php');
  85. $data $sql_object->DBSelect(SQL_getNewsletterList(0999'public'));
  86.  
  87. foreach ($data as &$el{
  88.  
  89.     $module encodeURIComponent(mb_ucfirst(_t('name''newsletter_module')' : '));
  90.     $name encodeURIComponent($el['newsletter_title']);
  91.     $link HrefMaker(array('rub' => $GLOBALS['links'][U_L]['newsletter']['linkvalue']'id' => $el['newsletter_id']'name' => $el['newsletter_title']'amp_no_conversion'=> true));
  92.  
  93.     $tmp array($module $nameSITE_ROOT_URL.'public/'.$link);
  94.     array_push($a$tmp);
  95. }
  96.  
  97. // Getting Projects
  98. ///////////////////
  99. include_once('../project/' SQL '.inc.php');
  100. $data $sql_object->DBSelect(SQL_getProjectsList(0999));
  101.  
  102.  
  103. foreach ($data as &$el{
  104.  
  105.     $module encodeURIComponent(mb_ucfirst(_t('name''project_module')' : '));
  106.     $name encodeURIComponent($el['project_name']);
  107.     $link HrefMaker(array('rub' => $GLOBALS['links'][U_L]['project']['linkvalue']'id' => $el['project_id']'name' => $el['project_name']'amp_no_conversion'=> true));
  108.  
  109.     $tmp array($module $nameSITE_ROOT_URL.'public/'.$link);
  110.     array_push($a$tmp);
  111. }
  112.  
  113. // Getting Workshops
  114. ///////////////////
  115. include_once('../workshop/' SQL '.inc.php');
  116. $data $sql_object->DBSelect(SQL_getWorkshopList(0999));
  117.  
  118. foreach ($data as &$el{
  119.  
  120.     $module encodeURIComponent(mb_ucfirst(_t('name''workshop_module')' : '));
  121.     $name encodeURIComponent($el['workshop_denomination']);
  122.     $link HrefMaker(array('rub' => $GLOBALS['links'][U_L]['workgroup']['linkvalue']'id' => $el['workshop_id']'name' => $el['workshop_denomination']'amp_no_conversion'=> true));
  123.  
  124.     $tmp array($module $nameSITE_ROOT_URL.'public/'.$link);
  125.     array_push($a$tmp);
  126. }
  127.  
  128. // Getting Indicators value
  129. ///////////////////
  130. include_once('../dashboard/' SQL '.inc.php');
  131. $data $sql_object->DBSelect(SQL_getIndicatorsAlpha(array('P')));
  132.  
  133. foreach ($data as &$el{
  134.  
  135.     $module encodeURIComponent(mb_ucfirst(_t('name''sdi_module')' : '));
  136.     $name encodeURIComponent($el['sdii_name']);
  137.     $link HrefMaker(array('rub' => $GLOBALS['links'][U_L]['dashboard']['linkvalue']'id' => $el['sdii_id']'name' => $el['sdii_name']'parentid' => 1'amp_no_conversion'=> true));
  138.  
  139.     $tmp array($module $nameSITE_ROOT_URL.'public/'.$link);
  140.     array_push($a$tmp);
  141. }
  142.  
  143. // we finally encode the array into JSON
  144. $string json_encode($a);
  145. echo $string;
  146. exit;
  147.  
  148. // $string = '';
  149. // foreach ($a as &$el) {
  150. //     $string .= '<a href="'.$el[1].'">'.$el[0].'</a>';
  151. // }
  152. // echo $string;
  153. // exit;
  154. ?>
  155. <input type='text' id='pageListJSON' value='<?php echo $string ?>'>

Documentation generated on Thu, 20 Mar 2014 16:49:47 +0100 by phpDocumentor 1.4.1