</td> <td width="5"> <?php echo JHTML::_('grid.id', $i, $row->id); ?> </td> <td> <a href="<?php echo $link; ?> " title="<?php echo JText::_('COM_REDSHOP_EDIT_NEWSLETTER_SUBSCR'); ?> "><?php $row->user_id == 0 ? $name = $row->name : ($name = $order_function->getUserFullname($row->user_id)); echo $name; ?> </a> </td> <td align="center" width="15%"> <?php echo $config->convertDateFormat($row->date); ?> </td> <td width="15%"> <?php echo $row->n_name; ?> </td> <td align="center" width="8%">
?> " method="post" name="adminForm" id="adminForm"> <table border="0" cellspacing="0" cellpadding="0" class="adminlist"> <tbody> <tr> <td> <table border="0" cellspacing="0" cellpadding="0" class="adminlist"> <tbody> <tr> <td width="100" align="right"><?php echo JText::_('COM_REDSHOP_SELECT_USER'); ?> :</td> <td><input type="text" name="searchusername" id="searchusername" value="<?php $this->detail->user_id != 0 ? $uname = $order_functions->getUserFullname($this->detail->user_id) : ($uname = $billing->firstname); echo $uname; ?> " size="30"/> <input type="hidden" name="user_id" id="user_id" value="<?php echo $this->detail->user_id; ?> "/> <a href="<?php echo JRoute::_('index.php?option=' . $option . '&view=addorder_detail&user_id=0&uid=add'); ?> "><?php echo JText::_('COM_REDSHOP_ADD_USER'); ?> </a>
<th width="5%" nowrap="nowrap"> <?php echo JHTML::_('grid.sort', 'COM_REDSHOP_ID', 'coupon_id', $this->lists['order_Dir'], $this->lists['order']); ?> </th> </tr> </thead> <?php $k = 0; for ($i = 0, $n = count($this->coupons); $i < $n; $i++) { $row =& $this->coupons[$i]; $row->id = $row->coupon_id; $link = JRoute::_('index.php?option=' . $option . '&view=coupon_detail&task=edit&cid[]=' . $row->coupon_id); $published = JHtml::_('jgrid.published', $row->published, $i, '', 1); if ($row->userid) { $username = $order_functions->getUserFullname($row->userid); } else { $username = ""; } ?> <tr class="<?php echo "row{$k}"; ?> "> <td align="center"> <?php echo $this->pagination->getRowOffset($i); ?> </td> <td align="center"> <?php
public function export_acy_data() { ob_clean(); $model = $this->getModel('newslettersubscr_detail'); $cid = JRequest::getVar('cid', array(), 'post', 'array'); $order_function = new order_functions(); $data = $model->getnewslettersbsc($cid); header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); header("Content-type: text/x-csv"); header("Content-type: text/csv"); header("Content-type: application/csv"); header('Content-Disposition: attachment; filename=import_to_acyba.csv'); echo '"email","name","enabled"'; echo "\n"; for ($i = 0; $i < count($data); $i++) { echo '"' . $data[$i]->email . '","'; if ($data[$i]->user_id != 0) { $subname = $order_function->getUserFullname($data[$i]->user_id); echo $subname; } else { echo $data[$i]->subscribername; } echo '","'; echo $data[$i]->published . '"'; echo "\n"; } exit; }