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

Source for file det.php

Documentation is available at det.php

  1. <?php
  2. /**
  3.  * @package linea21.modules
  4.  * @subpackage newsletter
  5.  * @author linea21 <info@linea21.com>
  6.  * @version $id SVN
  7.  * @access public
  8.  * @license http://opensource.org/licenses/gpl-3.0.html
  9.  */
  10.  
  11. //////////// Check Inclusion de pages ////////////
  12. if (!function_exists('AuthenthificationProcess')) {
  13.   include_once("../lib/lib_common.php");
  14.   ReloadIndex('admin');
  15. }
  16. ////////////
  17.  
  18. include_once(themePath('../user/'.SQL.'.inc.php'));
  19.  
  20. if (isset($_GET['id'])) $id $_GET['id'];
  21. if (isset($_POST['id'])) $id $_POST['id'];
  22.  
  23. // we get logged-in user email to send a newsletter test
  24. $user $sql_object->DBSelect(SQL_getAllUserInfo(GetSessionElement('id')));
  25. $user_email $user[0]['profile_email'];
  26.  
  27. $req_det SQL_getoneCompleteNewsLetter($id);
  28. $result $sql_object->DBSelect($req_det);
  29. if ($result == || count($result!= 1exit;
  30.  
  31. $display_title formatText($result[0]['newsletter_title']'2HTML');
  32. $display_body linkin_content(formatText($result[0]['newsletter_body']'2HTML'));
  33. $display_user formatText($result[0]['user_login']'2HTML');
  34. $display_date_crea $result[0]['newsletter_date_crea_display'];
  35. $display_last_modify $result[0]['newsletter_last_modify_display'];
  36. $display_statut display_statut($result[0]['newsletter_statut']);
  37. $newsletter_status $result[0]['newsletter_statut'];
  38. $newsletter_owner$result[0]['newsletter_posted_by'];
  39.  
  40. if ($result[0]['newsletter_published_date_display'== '01-01-0001'$display_published_date _t('statut','draft');
  41. else $display_published_date $result[0]['newsletter_published_date_display'];
  42.  
  43. $link_sup $rub_link "&amp;todo=sup&amp;id=";
  44. $link_mod $rub_link "&amp;todo=mod&amp;id=";
  45. ?>
  46. <div id="chemin">
  47. <ul>
  48.     <li><a href="index.php" class="chemin_home"> <?php echo _t('way','home')?>
  49.     </a></li>
  50.     <li><a href="<?php echo $rub_link?>" id="chemin_<?php echo $rub?>"
  51.         class="chemin_rub"> <?php echo _t('menu','newsletter')?> </a></li>
  52.     <li><span><?php echo formatNavTitle(_t('newsletter','det'" : " $display_title)?></span>
  53.     </li>
  54. </ul>
  55. </div>
  56. <!--end barre haute -->
  57. <?php
  58. include_once(THEME_ADMIN_PATH."quickicons.php");
  59.  
  60. ?>
  61. <div class="contentcontainer"><?php
  62. include_once($dir "/menurub.php");
  63.  
  64. ?>
  65. <div id="content"><?php
  66. echo "<h2>";
  67. echo formatTitleh2($display_title);
  68. echo "</h2>\n";
  69. if($newsletter_status!='P'{
  70.   echo '<a class="ico_send" href="#" id="send_test" title="'.sprintf(_t('newsletter','send_test')$user_email).'"></a>';
  71.   echo "\t<a href=\"" $link_sup $id "\" class=\"ico_sup2\" title=\"" _t('newsletter','sup'"\"></a>\n";
  72.   echo "\t<a href=\"" $link_mod $id "\" class=\"ico_mod2\" title=\"" _t('newsletter','mod'"\"></a>\n";
  73. }
  74. echo "<dl class=\"dl3\">\n";
  75. echo "<dt>" _t('newsletter','title'"</dt>\n";
  76. echo "<dd>" $display_title "</dd>\n";
  77. echo "<dt>" _t('newsletter','body'" :</dt>\n";
  78. echo "<dd>" $display_body "</dd>\n";
  79. echo "<dt>" _t('newsletter','author'" :</dt>\n";
  80. echo '<dd><a href="?rub=user&amp;todo=det&amp;id='.$newsletter_owner.'">' $display_user '</a></dd>'.END_LINE;
  81. echo "<dt>" _t('statut','published_on'"</dt>\n";
  82. echo "<dd>" $display_published_date "</dd>\n";
  83. echo "<dt>" _t('divers','date_crea'"</dt>\n";
  84. echo "<dd>" $display_date_crea "</dd>\n";
  85. echo "<dt>" _t('divers','last_modify'"</dt>\n";
  86. echo "<dd>" $display_last_modify "</dd>\n";
  87. echo "<dt>" _t('divers','statut'"</dt>\n";
  88. echo "<dd>" $display_statut "</dd>\n";
  89. echo "</dl>\n";
  90. ?></div>
  91. <?php include_once($dir "/help.php");
  92. ?></div>
  93. <script type="text/javascript">
  94.                   $(function() {
  95.                       $("a#send_test").click(function() {
  96.                           var url = '<?php echo '../newsletter/_ajax_send.php?id='.$id.'&user_email='.$user_email?>';
  97.                           humane.info('<span class="loading">&nbsp;<\/span>' + '<?php echo _t('newsletter''sending_mail')?>');
  98.                         $.ajax({
  99.                             type: "POST",
  100.                           url: url,
  101.                           data: "call=ajax",
  102.                           dataType: "json",
  103.                           success: function(data){
  104.                             if(data.status==1) {
  105.                                 humane.success(data.msg);
  106.                             } else {
  107.                                 humane.error(data.msg);
  108.                             }
  109.                           }
  110.                         });
  111.                         return false;
  112.                     });
  113.                 
  114.                   });
  115. </script>

Documentation generated on Thu, 03 May 2012 15:03:40 +0200 by phpDocumentor 1.4.1