PageRenderTime 45ms CodeModel.GetById 16ms RepoModel.GetById 0ms app.codeStats 0ms

/Quản lý website bán mỹ phẩm PHP/administrator/components/com_acymailing/views/subscriber/tmpl/listing.php

https://gitlab.com/phamngsinh/baitaplon_sinhvien
PHP | 187 lines | 183 code | 0 blank | 4 comment | 21 complexity | bdfcbb13cde57e8519d4b19ff59c00d8 MD5 | raw file
  1. <?php
  2. /**
  3. * @copyright Copyright (C) 2009-2012 ACYBA SARL - All rights reserved.
  4. * @license http://www.gnu.org/licenses/gpl-3.0.html GNU/GPL
  5. */
  6. defined('_JEXEC') or die('Restricted access');
  7. ?>
  8. <div id="acy_content">
  9. <div id="iframedoc"></div>
  10. <form action="<?php echo JRoute::_('index.php?option=com_acymailing&ctrl='.JRequest::getCmd('ctrl')); ?>" method="post" name="adminForm" id="adminForm">
  11. <table>
  12. <tr>
  13. <td width="100%" id="subscriberfilter">
  14. <?php echo JText::_( 'JOOMEXT_FILTER' ); ?>:
  15. <input type="text" name="search" id="acymailingsearch" value="<?php echo $this->escape($this->pageInfo->search);?>" class="text_area" />
  16. <button onclick="document.adminForm.limitstart.value=0;this.form.submit();"><?php echo JText::_( 'JOOMEXT_GO' ); ?></button>
  17. <button onclick="document.getElementById('acymailingsearch').value='';document.adminForm.limitstart.value=0;this.form.submit();"><?php echo JText::_( 'JOOMEXT_RESET' ); ?></button>
  18. </td>
  19. <td nowrap="nowrap">
  20. <span id="subscriberfilterlists"><?php echo $this->filters->lists; ?></span>
  21. <span id="subscriberfilterstatus"><?php echo $this->filters->status; ?></span>
  22. </td>
  23. </tr>
  24. </table>
  25. <table class="adminlist" cellpadding="1">
  26. <thead>
  27. <tr>
  28. <th class="title titlenum">
  29. <?php echo JText::_( 'ACY_NUM' ); ?>
  30. </th>
  31. <th class="title titlebox">
  32. <input type="checkbox" name="toggle" value="" onclick="checkAll(<?php echo count($this->rows); ?>);" />
  33. </th>
  34. <?php
  35. foreach($this->displayFields as $map => $oneField){
  36. if($map == 'html') continue; ?>
  37. <th class="title">
  38. <?php echo JHTML::_('grid.sort', $this->customFields->trans($oneField->fieldname), 'a.'.$map, $this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value ); ?>
  39. </th>
  40. <?php } ?>
  41. <?php $app = JFactory::getApplication();
  42. if($app->isAdmin()){ ?>
  43. <th class="title">
  44. <?php echo JText::_('SUBSCRIPTION'); ?>
  45. </th>
  46. <?php } ?>
  47. <th class="title titledate">
  48. <?php echo JHTML::_('grid.sort', JText::_('CREATED_DATE'), 'a.created', $this->pageInfo->filter->order->dir, $this->pageInfo->filter->order->value ); ?>
  49. </th>
  50. <?php
  51. if($app->isAdmin()){
  52. if(!empty($this->displayFields['html'])){ ?>
  53. <th class="title titletoggle">
  54. <?php echo JHTML::_('grid.sort', JText::_('RECEIVE_HTML'), 'a.html', $this->pageInfo->filter->order->dir, $this->pageInfo->filter->order->value ); ?>
  55. </th>
  56. <?php } ?>
  57. <?php if($this->config->get('require_confirmation',1)){ ?>
  58. <th class="title titletoggle">
  59. <?php echo JHTML::_('grid.sort', JText::_('CONFIRMED'), 'a.confirmed', $this->pageInfo->filter->order->dir, $this->pageInfo->filter->order->value ); ?>
  60. </th>
  61. <?php } ?>
  62. <th class="title titletoggle">
  63. <?php echo JHTML::_('grid.sort', JText::_('ENABLED'), 'a.enabled', $this->pageInfo->filter->order->dir, $this->pageInfo->filter->order->value ); ?>
  64. </th>
  65. <th class="title titleid">
  66. <?php echo JHTML::_('grid.sort', JText::_('USER_ID'), 'a.userid', $this->pageInfo->filter->order->dir, $this->pageInfo->filter->order->value ); ?>
  67. </th>
  68. <th class="title titleid">
  69. <?php echo JHTML::_('grid.sort', JText::_('ACY_ID'), 'a.subid', $this->pageInfo->filter->order->dir, $this->pageInfo->filter->order->value ); ?>
  70. </th>
  71. <?php } ?>
  72. </tr>
  73. </thead>
  74. <tfoot>
  75. <tr>
  76. <td colspan="<?php echo $app->isAdmin() ? count($this->displayFields)+9 : count($this->displayFields)+2; ?>">
  77. <?php echo $this->pagination->getListFooter(); ?>
  78. <?php echo $this->pagination->getResultsCounter(); ?>
  79. </td>
  80. </tr>
  81. </tfoot>
  82. <tbody>
  83. <?php
  84. $k = 0;
  85. $i = 0;
  86. foreach($this->rows as $row){
  87. $confirmedid = 'confirmed_'.$row->subid;
  88. $htmlid = 'html_'.$row->subid;
  89. $enabledid = 'enabled_'.$row->subid;
  90. ?>
  91. <tr class="<?php echo "row$k"; ?>">
  92. <td align="center">
  93. <?php echo $this->pagination->getRowOffset($i); ?>
  94. </td>
  95. <td align="center">
  96. <input type="checkbox" onclick="isChecked(this.checked);" value="<?php echo $row->subid; ?>" name="cid[]" id="cb<?php echo $i; ?>">
  97. </td>
  98. <?php foreach($this->displayFields as $map => $oneField){
  99. if($map == 'html') continue; ?>
  100. <td>
  101. <?php
  102. if($map =='email') echo '<a href="'.acymailing_completeLink(JRequest::getCmd('ctrl').'&task=edit&subid='.$row->subid).'">';
  103. echo $this->customFields->listing($oneField,$row->$map);
  104. if($map =='email') echo '</a>';
  105. ?>
  106. </td>
  107. <?php }
  108. if($app->isAdmin()){
  109. ?>
  110. <td align="right">
  111. <?php
  112. if(empty($row->accept)){
  113. echo '<div class="icon-16-refuse" >'.JHTML::_('tooltip',JText::_('USER_REFUSE',true), '','','&nbsp;&nbsp;&nbsp;&nbsp;').'</div>';
  114. }
  115. foreach($this->lists as $listid => $list){
  116. if(empty($row->subscription->$listid)) continue;
  117. $statuslistid = 'status_'.$listid.'_'.$row->subid;
  118. echo '<div id="'.$statuslistid.'" class="loading">';
  119. $extra = array();
  120. $extra['color'] = $this->lists[$listid]->color;
  121. $extra['tooltiptitle'] = $this->lists[$listid]->name;
  122. $extra['tooltip'] = '<b>'.JText::_('LIST_NAME').' : </b>'.$this->lists[$listid]->name.'<br/>';
  123. if($row->subscription->$listid->status > 0){
  124. $extra['tooltip'] .= '<b>'.JText::_('STATUS').' : </b>';
  125. $extra['tooltip'] .= ($row->subscription->$listid->status == '1') ? JText::_('SUBSCRIBED') : JText::_('PENDING_SUBSCRIPTION');
  126. $extra['tooltip'] .= '<br/><b>'.JText::_('SUBSCRIPTION_DATE').' : </b>'.acymailing_getDate($row->subscription->$listid->subdate);
  127. }else{
  128. $extra['tooltip'] .= '<b>'.JText::_('STATUS').' : </b>'.JText::_('UNSUBSCRIBED').'<br/>';
  129. $extra['tooltip'] .= '<b>'.JText::_('UNSUBSCRIPTION_DATE').' : </b>'.acymailing_getDate($row->subscription->$listid->unsubdate);
  130. }
  131. echo $this->toggleClass->toggle($statuslistid,$row->subscription->$listid->status,'listsub',$extra);
  132. echo '</div>';
  133. }
  134. ?>
  135. </td>
  136. <?php } ?>
  137. <td align="center">
  138. <?php echo acymailing_getDate($row->created); ?>
  139. </td>
  140. <?php if($app->isAdmin()){
  141. if(!empty($this->displayFields['html'])){ ?>
  142. <td align="center">
  143. <span id="<?php echo $htmlid ?>" class="loading"><?php echo $this->toggleClass->toggle($htmlid,$row->html,'subscriber') ?></span>
  144. </td>
  145. <?php } ?>
  146. <?php if($this->config->get('require_confirmation',1)){ ?>
  147. <td align="center">
  148. <span id="<?php echo $confirmedid ?>" class="loading"><?php echo $this->toggleClass->toggle($confirmedid,$row->confirmed,'subscriber') ?></span>
  149. </td>
  150. <?php } ?>
  151. <td align="center">
  152. <span id="<?php echo $enabledid ?>" class="loading"><?php echo $this->toggleClass->toggle($enabledid,$row->enabled,'subscriber') ?></span>
  153. </td>
  154. <td align="center">
  155. <?php if(!empty($row->userid)){
  156. if(file_exists(ACYMAILING_ROOT.'components'.DS.'com_comprofiler'.DS.'comprofiler.php')){
  157. $editLink = 'index.php?option=com_comprofiler&task=edit&cid[]=';
  158. }elseif(version_compare(JVERSION,'1.6.0','<')){
  159. $editLink = 'index.php?option=com_users&task=edit&cid[]=';
  160. }else{
  161. $editLink = 'index.php?option=com_users&task=user.edit&id=';
  162. }
  163. $text = JText::_('ACY_USERNAME').' : <b>'.$row->username;
  164. $text .= '</b><br/>'.JText::_('USER_ID').' : <b>'.$row->userid.'</b>';
  165. echo acymailing_tooltip($text,$row->username,'',$row->userid,$editLink.$row->userid);} ?>
  166. </td>
  167. <td align="center">
  168. <?php echo $row->subid; ?>
  169. </td>
  170. <?php } ?>
  171. </tr>
  172. <?php
  173. $k = 1-$k; $i++;
  174. }
  175. ?>
  176. </tbody>
  177. </table>
  178. <input type="hidden" name="option" value="<?php echo ACYMAILING_COMPONENT; ?>" />
  179. <input type="hidden" name="task" value="" />
  180. <input type="hidden" name="ctrl" value="<?php echo JRequest::getCmd('ctrl'); ?>" />
  181. <input type="hidden" name="boxchecked" value="0" />
  182. <input type="hidden" name="filter_order" value="<?php echo $this->pageInfo->filter->order->value; ?>" />
  183. <input type="hidden" name="filter_order_Dir" value="<?php echo $this->pageInfo->filter->order->dir; ?>" />
  184. <?php if(!empty($this->Itemid)) echo '<input type="hidden" name="Itemid" value="'.$this->Itemid.'" />';
  185. echo JHTML::_( 'form.token' ); ?>
  186. </form>
  187. </div>