/** * Method to provide a shortcut to binding, checking and storing a JTable * instance to the database table. The method will check a row in once the * data has been stored and if an ordering filter is present will attempt to * reorder the table rows based on the filter. The ordering filter is an instance * property name. The rows that will be reordered are those whose value matches * the JTable instance for the property specified. * * @param mixed $src An associative array or object to bind to the JTable instance. * @param string $orderingFilter Filter for the order updating * @param mixed $ignore An optional array or space separated list of properties * to ignore while binding. * * @return boolean True on success. * * @link http://docs.joomla.org/JTable/save * @since 11.1 */ public function save($src, $orderingFilter = '', $ignore = '') { // Attempt to bind the source to the instance. if (!$this->bind($src, $ignore)) { return false; } // Run any sanity checks on the instance and verify that it is ready for storage. if (!$this->check()) { return false; } // Attempt to store the properties to the database table. if (!$this->store()) { return false; } // Attempt to check the row in, just in case it was checked out. if (!$this->checkin()) { return false; } // If an ordering filter is set, attempt reorder the rows in the table based on the filter and value. if ($orderingFilter) { $filterValue = $this->{$orderingFilter}; $this->reorder($orderingFilter ? $this->_db->quoteName($orderingFilter) . ' = ' . $this->_db->Quote($filterValue) : ''); } // Set the error to empty and return true. $this->setError(''); return true; }
public function getCallbackParams($form){ $retArray = array(); $this->db->setQuery("Select template_areas From #__facileforms_forms Where id = ".$this->db->Quote($form).""); $objList = $this->db->loadObjectList(); $objListCount = count($objList); if($objListCount == 1){ $retArray['areas'] = $objList[0]->template_areas; } return $retArray; }
protected function _modTopicList($data) { $result = array(); $catid = intval($data); $user = KunenaFactory::getuser(); if ($catid && $user->isModerator($catid)) { $query = "SELECT id, subject\n\t\t\t\t\t\t\tFROM #__kunena_messages\n\t\t\t\t\t\t\tWHERE catid={$this->_db->Quote($catid)} AND parent=0 AND moved=0\n\t\t\t\t\t\t\tORDER BY id DESC"; $this->_db->setQuery($query, 0, 15); $topics_list = $this->_db->loadObjectlist(); if ($this->_db->getErrorNum()) { $result = array('status' => '-1', 'error' => KunenaError::getDatabaseError()); } else { $result['status'] = '1'; $result['topiclist'] = $topics_list; } } else { $result['status'] = '0'; $result['error'] = 'Error'; } return $result; }
/** * Generic save function * * @access public * @param array Source array for binding to class vars * @param string Filter for the order updating * @param mixed An array or space separated list of fields not to bind * @returns TRUE if completely successful, FALSE if partially or not succesful. */ function save($source, $order_filter = '', $ignore = '') { if (!$this->bind($source, $ignore)) { return false; } if (!$this->check()) { return false; } if (!$this->store()) { return false; } if (!$this->checkin()) { return false; } if ($order_filter) { $filter_value = $this->{$order_filter}; $this->reorder($order_filter ? $this->_db->nameQuote($order_filter) . ' = ' . $this->_db->Quote($filter_value) : ''); } $this->setError(''); return true; }
public function saveFinalizeCode(){ $this->db->setQuery("Update #__facileforms_integrator_rules Set finalize_code = ".$this->db->Quote($_REQUEST['finalizeCode'])." Where id = ".JRequest::getInt('id',-1).""); $this->db->query(); }
public function listRecords() { JToolBarHelper::title('<img src="'. JURI::root() . 'administrator/components/com_breezingforms/libraries/jquery/themes/easymode/i/logo-breezingforms.png'.'" align="top"/>'); JToolBarHelper::custom('exportPdf', 'ff_download', 'ff_download_f2', BFText::_('COM_BREEZINGFORMS_PDF'), false); JToolBarHelper::custom('exportCsv', 'ff_download', 'ff_download_f2', BFText::_('COM_BREEZINGFORMS_CSV'), false); JToolBarHelper::custom('exportXml', 'ff_download', 'ff_download_f2', BFText::_('COM_BREEZINGFORMS_XML'), false); JToolBarHelper::custom('remove', 'delete.png', 'delete_f2.png', BFText::_('COM_BREEZINGFORMS_TOOLBAR_DELETE'), false); JToolBarHelper::custom('all', 'ff_switch', 'ff_switch_f2', BFText::_('COM_BREEZINGFORMS_ALL'), false); JToolBarHelper::custom('viewed', 'ff_switch', 'ff_switch_f2', BFText::_('COM_BREEZINGFORMS_TOOLBAR_VIEWED'), false); JToolBarHelper::custom('exported', 'ff_switch', 'ff_switch_f2', BFText::_('COM_BREEZINGFORMS_TOOLBAR_EXPORTED'), false); JToolBarHelper::custom('archived', 'ff_switch', 'ff_switch_f2', BFText::_('COM_BREEZINGFORMS_TOOLBAR_ARCHIVED'), false); JFactory::getDocument()->addStyleDeclaration( ' .icon-32-ff_switch { background-image:url(components/com_breezingforms/images/icons/switch.png); } .icon-32-ff_switch_f2 { background-image:url(components/com_breezingforms/images/icons/switch_f2.png); } .icon-32-ff_download { background-image:url(components/com_breezingforms/images/icons/download.png); } .icon-32-ff_download_f2 { background-image:url(components/com_breezingforms/images/icons/download_f2.png); } ' ); //print_r($_REQUEST); $ids = JRequest::getVar('ids', array()); $offset = JRequest::getInt('limitstart', 0); $limit = JRequest::getInt('mylimit', 20); if(JRequest::getVar('task','') == 'all') { JFactory::getSession()->set('bfStatus', ''); } else if(JRequest::getVar('task','')=='exported') { JFactory::getSession()->set('bfStatus', 'exported'); } else if(JRequest::getVar('task','')=='archived') { JFactory::getSession()->set('bfStatus', 'archived'); } else if(JRequest::getVar('task','')=='viewed') { JFactory::getSession()->set('bfStatus', 'viewed'); } else if(JRequest::getVar('task','')=='remove') { $size = count($ids); for($i = 0; $i < $size; $i++) { $this->db->setQuery("Delete From #__facileforms_records Where id = " . $this->db->Quote($ids[$i])); $this->db->query(); $this->db->setQuery("Delete From #__facileforms_subrecords Where record = " . $this->db->Quote($ids[$i])); $this->db->query(); //echo $this->db->getQuery() . '<br/>'; } } else if(JRequest::getVar('task','')=='save') { $id = JRequest::getInt('record_id', 0); $updates = JRequest::getVar('update', array()); foreach($updates As $update) { $this->db->setQuery("Update #__facileforms_subrecords Set value = ".$this->db->Quote(JRequest::getVar('ff_nm_'.$update,''))." Where name = ".$this->db->Quote($update)." And record = " . $id); $this->db->query(); } } else if(JRequest::getVar('task','')=='exportXml' && JRequest::getInt('exportt',0) == 1) { $this->expxml($ids); } else if(JRequest::getVar('task','')=='exportCsv' && JRequest::getInt('exportt',0) == 1) { $this->expcsv($ids); } else if(JRequest::getVar('task','')=='exportPdf' && JRequest::getInt('exportt',0) == 1) { $this->exppdf($ids); } if(JRequest::getInt('status_update',0) == 1) { $offset = 0; $limit = 20; JRequest::setVar('limitstart', 0); JRequest::setVar('mylimit', 20); } if(JRequest::getInt('id', 0) != '' && JRequest::getInt('viewed', -1) != -1) { $value = 1; if(JRequest::getInt('viewed', -1) == 1) { $value = 0; } $this->db->setQuery("Update #__facileforms_records Set viewed = ".$value." Where id = " . JRequest::getInt('id', 0)); $this->db->query(); } if(JRequest::getInt('id', 0) != '' && JRequest::getInt('exported', -1) != -1) { $value = 1; if(JRequest::getInt('exported', -1) == 1) { $value = 0; } $this->db->setQuery("Update #__facileforms_records Set exported = ".$value." Where id = " . JRequest::getInt('id', 0)); $this->db->query(); } if(JRequest::getInt('id', 0) != '' && JRequest::getInt('archived', -1) != -1) { $value = 1; if(JRequest::getInt('archived', -1) == 1) { $value = 0; } $this->db->setQuery("Update #__facileforms_records Set archived = ".$value." Where id = " . JRequest::getInt('id', 0)); $this->db->query(); } if(JRequest::getInt('status_update',0) == 1 && JRequest::getVar('write_status','') != '') { $in = ''; if(is_array($ids) && count($ids) != 0) { $status = ''; if(JFactory::getSession()->get('bfStatus', '') == 'exported') { $status = "exported = ".(JRequest::getVar('write_status','') == 'set' ? 1 : 0); } else if(JFactory::getSession()->get('bfStatus', '') == 'archived') { $status = "archived = ".(JRequest::getVar('write_status','') == 'set' ? 1 : 0); } else if(JFactory::getSession()->get('bfStatus', '') == 'viewed') { $status = "viewed = ".(JRequest::getVar('write_status','') == 'set' ? 1 : 0); } if($status != '' ) { $size = count($ids); for($i = 0; $i < $size; $i++) { $this->db->setQuery("Update #__facileforms_records Set $status Where id = " . $this->db->Quote($ids[$i])); $this->db->query(); //echo $this->db->getQuery() . '<br/>'; } } } } $ands = ''; $subs = ''; if(JRequest::getVar('search','') != '') { //echo JRequest::getVar('txtsearch','false'); if(JRequest::getVar('txtsearch','false')=='true') { $subs .= ', #__facileforms_subrecords As subrecord'; $ands .= 'subrecord.value Like ' . $this->db->Quote('%'.JRequest::getVar('search','').'%') . ' And record.id = subrecord.record And '; } $headerSearch = ''; if(is_numeric(JRequest::getVar('search',''))) { $headerSearch .= 'record.id = ' . intval(JRequest::getVar('search','')) . ' Or '; } $ex = explode('-', JRequest::getVar('search','')); //print_r($ex); if(count($ex) == 3 && checkdate($ex[1], $ex[2], $ex[0])) { $headerSearch .= "record.submitted Between '" . $ex[0] . '-' . $ex[1] . '-' . $ex[2] . " 00:00:00' And '" . $ex[0] . '-' . $ex[1] . '-' . $ex[2] . " 23:59:59' Or "; $headerSearch .= "record.paypal_payment_date Between '" . $ex[0] . '-' . $ex[1] . '-' . $ex[2] . " 00:00:00' And '" . $ex[0] . '-' . $ex[1] . '-' . $ex[2] . " 23:59:59' Or "; } if(is_ip(JRequest::getVar('search',''))) { $headerSearch .= 'record.ip = ' . $this->db->Quote(JRequest::getVar('search','')) . ' Or '; } if(substr(trim(JRequest::getVar('search','')), 0,4) == 'tx: ') { $text = trim(JRequest::getVar('search','')); $text = substr($text, 3,strlen($text)); $headerSearch .= 'record.paypal_tx_id Like ' . $this->db->Quote('%'.$text) . ' Or '; } if($headerSearch == '' && JRequest::getVar('txtsearch','false')!='true') { $headerSearch .= 'record.`name` Like ' . $this->db->Quote('%'.trim(JRequest::getVar('search','')).'%') . ' Or '; } if($headerSearch != '') { $headerSearch = substr($headerSearch,0,strlen($headerSearch)-4); $ands .= "(".$headerSearch.") And "; } } if(JRequest::getInt('form',0) != 0) { $ands .= 'record.form = ' . $this->db->Quote(JRequest::getInt('form',0)) . ' And '; } if(JFactory::getSession()->get('bfStatus', '') == 'exported') { $ands .= "record.exported = 1 And"; } else if(JFactory::getSession()->get('bfStatus', '') == 'archived') { $ands .= "record.archived = 1 And"; } else if(JFactory::getSession()->get('bfStatus', '') == 'viewed') { $ands .= "record.viewed = 1 And"; } if($ands != '') { $ands = 'Where ' . substr($ands,0,strlen($ands)-4); } $limiter = " Limit $offset, $limit"; if($limit == 0) { $limiter = ''; } $this->db->setQuery("Select Distinct SQL_CALC_FOUND_ROWS record.* From #__facileforms_records As record $subs $ands Order By record.".JRequest::getWord('orderBy','submitted')." ".(JRequest::getWord('order','DESC') == 'DESC' ? 'ASC' : 'DESC').$limiter); $rows = $this->db->loadObjectList(); //echo $this->db->getQuery(); $this->db->setQuery("SELECT FOUND_ROWS();"); $foundRows = $this->db->loadResult(); jimport('joomla.html.pagination'); $pagination = new JPagination($foundRows, $offset, $limit); $this->db->setQuery("Select Distinct form As id, `name`, title From #__facileforms_records Order By title"); $forms = $this->db->loadObjectList(); $size = count($forms); $formsArray = array(); for($i = 0;$i < $size;$i++) { if(!isset($formsArray['_'.$forms[$i]->id])){ $formsArray['_'.$forms[$i]->id] = $forms[$i]; } } $forms = $formsArray; ?> <script type="text/javascript"> var bf_submitbutton = function(pressbutton) { var form = document.adminForm; switch (pressbutton) { case 'remove': case 'exportCsv': case 'exportXls': case 'exportPdf': case 'exportXml': if (form.boxchecked.value==0) { alert("<?php echo BFText::_('COM_BREEZINGFORMS_RECORDS_PLSSELECTRECS'); ?>"); return; } // if form.exportt.value = 1; break; case 'viewed': case 'exported': case 'archived': var writeStatus = false; for(var i = 0; i < form.write_status.length; i++) { if(form.write_status[i].checked && (form.write_status[i].value == 'set' || form.write_status[i].value == 'unset')) { writeStatus = true; break; } } if (writeStatus && form.boxchecked.value==0) { alert("<?php echo BFText::_('COM_BREEZINGFORMS_RECORDS_PLSSELECTRECS'); ?>"); return; } // if form.status_update.value = 1; break; default: break; } // switch switch (pressbutton) { case 'remove': if (!confirm("<?php echo BFText::_('COM_BREEZINGFORMS_RECORDS_ASKDELETE'); ?>")) return; break; default: break; } // switch submitform(pressbutton); form.exportt.value = 0; }; // submitbutton if(typeof Joomla != "undefined"){ Joomla.submitbutton = bf_submitbutton; }else{ submitbutton = bf_submitbutton; } function bf_listItemTask( id, task ) { var f = document.adminForm; cb = eval( 'f.' + id ); if (cb) { for (i = 0; true; i++) { cbx = eval('f.cb'+i); if (!cbx) break; cbx.checked = false; } // for cb.checked = true; f.boxchecked.value = 1; submitbutton(task); } return false; } // listItemTask </script> <form action="index.php" method="post" name="adminForm"> <div id="editcell"> <table class="adminlist"> <thead> <tr> <td valign="top" colspan="1000"> <table class="adminlist" width="100%"> <thead> <tr> <td> <?php echo BFText::_('COM_BREEZINGFORMS_FILTER'); ?>: <input type="text" name="search" value="<?php echo htmlentities(JRequest::getVar('search',''),ENT_QUOTES, 'UTF-8'); ?>" onchange="form.status_update.value = 1;document.adminForm.submit()"/> <?php echo BFText::_('COM_BREEZINGFORMS_TEXT'); ?>: <input type="checkbox" name="txtsearch" onclick="form.status_update.value = 1;document.adminForm.submit()" value="true"<?php echo JRequest::getWord('txtsearch','false') == 'true' ? ' checked="checked"' : ''; ?>/> <select name="form" onchange="form.status_update.value = 1;document.adminForm.submit()"> <option value=""><?php echo BFText::_('COM_BREEZINGFORMS_ALL'); ?></option> <?php foreach($forms As $form) { if(trim($form->name) != '') { echo '<option value="'.$form->id.'"'.(JRequest::getInt('form',0) == $form->id ? ' selected="selected"' : '').'>'.htmlentities($form->title, ENT_QUOTES, 'UTF-8').' ('.htmlentities($form->name, ENT_QUOTES, 'UTF-8').')</option>'."\n"; } } ?> </select> </td> <td align="right" valign="top"> <?php echo BFText::_('COM_BREEZINGFORMS_WRITE_STATUS'); ?>: <input type="radio" name="write_status" value=""<?php echo JRequest::getVar('write_status','') == '' ? ' checked="checked"' : ''; ?>/> <?php echo BFText::_('COM_BREEZINGFORMS_NONE'); ?> <input type="radio" name="write_status" value="unset"<?php echo JRequest::getVar('write_status','') == 'unset' ? ' checked="checked"' : ''; ?>/> <?php echo BFText::_('COM_BREEZINGFORMS_UNSET'); ?> <input type="radio" name="write_status" value="set"<?php echo JRequest::getVar('write_status','') == 'set' ? ' checked="checked"' : ''; ?>/> <?php echo BFText::_('COM_BREEZINGFORMS_SET'); ?> </td> </tr> </thead> </table> </td> </tr> <tr> <th nowrap align="center"><input type="checkbox" name="toggle" value="" onclick="checkAll(<?php echo count($rows); ?>);" /></th> <th> <a href="index.php?option=com_breezingforms&act=recordmanagement&txtsearch=<?php echo JRequest::getWord('txtsearch','false'); ?>&search=<?php echo htmlentities(JRequest::getVar('search',''), ENT_QUOTES, 'UTF-8'); ?>&form=<?php echo htmlentities(JRequest::getVar('form',''), ENT_QUOTES, 'UTF-8'); ?>&task=<?php echo JRequest::getVar('task',''); ?>&limitstart=<?php echo JRequest::getInt('limitstart',0); ?>&mylimit=<?php echo JRequest::getInt('mylimit',20); ?>&order=<?php echo JRequest::getVar('order', 'DESC') == 'DESC' ? 'ASC' : 'DESC'; ?>&orderBy=id"><?php echo BFText::_('COM_BREEZINGFORMS_ID'); ?></a> </th> <th> <a href="index.php?option=com_breezingforms&act=recordmanagement&txtsearch=<?php echo JRequest::getWord('txtsearch','false'); ?>&search=<?php echo htmlentities(JRequest::getVar('search',''), ENT_QUOTES, 'UTF-8'); ?>&form=<?php echo htmlentities(JRequest::getVar('form',''), ENT_QUOTES, 'UTF-8'); ?>&task=<?php echo JRequest::getVar('task',''); ?>&limitstart=<?php echo JRequest::getInt('limitstart',0); ?>&mylimit=<?php echo JRequest::getInt('mylimit',20); ?>&order=<?php echo JRequest::getVar('order', 'DESC') == 'DESC' ? 'ASC' : 'DESC'; ?>&orderBy=submitted"><?php echo BFText::_('COM_BREEZINGFORMS_RECORDS_SUBMITTED'); ?></a> </th> <th> <a href="index.php?option=com_breezingforms&act=recordmanagement&txtsearch=<?php echo JRequest::getWord('txtsearch','false'); ?>&search=<?php echo htmlentities(JRequest::getVar('search',''), ENT_QUOTES, 'UTF-8'); ?>&form=<?php echo htmlentities(JRequest::getVar('form',''), ENT_QUOTES, 'UTF-8'); ?>&task=<?php echo JRequest::getVar('task',''); ?>&limitstart=<?php echo JRequest::getInt('limitstart',0); ?>&mylimit=<?php echo JRequest::getInt('mylimit',20); ?>&order=<?php echo JRequest::getVar('order', 'DESC') == 'DESC' ? 'ASC' : 'DESC'; ?>&orderBy=ip"><?php echo BFText::_('COM_BREEZINGFORMS_IP'); ?></a> </th> <th> <a href="index.php?option=com_breezingforms&act=recordmanagement&txtsearch=<?php echo JRequest::getWord('txtsearch','false'); ?>&search=<?php echo htmlentities(JRequest::getVar('search',''), ENT_QUOTES, 'UTF-8'); ?>&form=<?php echo htmlentities(JRequest::getVar('form',''), ENT_QUOTES, 'UTF-8'); ?>&task=<?php echo JRequest::getVar('task',''); ?>&limitstart=<?php echo JRequest::getInt('limitstart',0); ?>&mylimit=<?php echo JRequest::getInt('mylimit',20); ?>&order=<?php echo JRequest::getVar('order', 'DESC') == 'DESC' ? 'ASC' : 'DESC'; ?>&orderBy=provider"><?php echo BFText::_('COM_BREEZINGFORMS_RECORDS_PROVIDER'); ?></a> </th> <th> <a href="index.php?option=com_breezingforms&act=recordmanagement&txtsearch=<?php echo JRequest::getWord('txtsearch','false'); ?>&search=<?php echo htmlentities(JRequest::getVar('search',''), ENT_QUOTES, 'UTF-8'); ?>&form=<?php echo htmlentities(JRequest::getVar('form',''), ENT_QUOTES, 'UTF-8'); ?>&task=<?php echo JRequest::getVar('task',''); ?>&limitstart=<?php echo JRequest::getInt('limitstart',0); ?>&mylimit=<?php echo JRequest::getInt('mylimit',20); ?>&order=<?php echo JRequest::getVar('order', 'DESC') == 'DESC' ? 'ASC' : 'DESC'; ?>&orderBy=title"><?php echo BFText::_('COM_BREEZINGFORMS_RECORDS_TITLE'); ?></a> </th> <th> <a href="index.php?option=com_breezingforms&act=recordmanagement&txtsearch=<?php echo JRequest::getWord('txtsearch','false'); ?>&search=<?php echo htmlentities(JRequest::getVar('search',''), ENT_QUOTES, 'UTF-8'); ?>&form=<?php echo htmlentities(JRequest::getVar('form',''), ENT_QUOTES, 'UTF-8'); ?>&task=<?php echo JRequest::getVar('task',''); ?>&limitstart=<?php echo JRequest::getInt('limitstart',0); ?>&mylimit=<?php echo JRequest::getInt('mylimit',20); ?>&order=<?php echo JRequest::getVar('order', 'DESC') == 'DESC' ? 'ASC' : 'DESC'; ?>&orderBy=name"><?php echo BFText::_('COM_BREEZINGFORMS_RECORDS_NAME'); ?></a> </th> <th> <a href="index.php?option=com_breezingforms&act=recordmanagement&txtsearch=<?php echo JRequest::getWord('txtsearch','false'); ?>&search=<?php echo htmlentities(JRequest::getVar('search',''), ENT_QUOTES, 'UTF-8'); ?>&form=<?php echo htmlentities(JRequest::getVar('form',''), ENT_QUOTES, 'UTF-8'); ?>&task=<?php echo JRequest::getVar('task',''); ?>&limitstart=<?php echo JRequest::getInt('limitstart',0); ?>&mylimit=<?php echo JRequest::getInt('mylimit',20); ?>&order=<?php echo JRequest::getVar('order', 'DESC') == 'DESC' ? 'ASC' : 'DESC'; ?>&orderBy=paypal_tx_id"><?php echo BFText::_('COM_BREEZINGFORMS_PAYMENT_TX_ID'); ?></a> </th> <th> <a href="index.php?option=com_breezingforms&act=recordmanagement&txtsearch=<?php echo JRequest::getWord('txtsearch','false'); ?>&search=<?php echo htmlentities(JRequest::getVar('search',''), ENT_QUOTES, 'UTF-8'); ?>&form=<?php echo htmlentities(JRequest::getVar('form',''), ENT_QUOTES, 'UTF-8'); ?>&task=<?php echo JRequest::getVar('task',''); ?>&limitstart=<?php echo JRequest::getInt('limitstart',0); ?>&mylimit=<?php echo JRequest::getInt('mylimit',20); ?>&order=<?php echo JRequest::getVar('order', 'DESC') == 'DESC' ? 'ASC' : 'DESC'; ?>&orderBy=paypal_payment_date"><?php echo BFText::_('COM_BREEZINGFORMS_PAYMENT_TX_DATE'); ?></a> </th> <th> <a href="index.php?option=com_breezingforms&act=recordmanagement&txtsearch=<?php echo JRequest::getWord('txtsearch','false'); ?>&search=<?php echo htmlentities(JRequest::getVar('search',''), ENT_QUOTES, 'UTF-8'); ?>&form=<?php echo htmlentities(JRequest::getVar('form',''), ENT_QUOTES, 'UTF-8'); ?>&task=<?php echo JRequest::getVar('task',''); ?>&limitstart=<?php echo JRequest::getInt('limitstart',0); ?>&mylimit=<?php echo JRequest::getInt('mylimit',20); ?>&order=<?php echo JRequest::getVar('order', 'DESC') == 'DESC' ? 'ASC' : 'DESC'; ?>&orderBy=paypal_testaccount"><?php echo BFText::_('COM_BREEZINGFORMS_PAYMENT_TESTACCOUNT'); ?></a> </th> <th> <a href="index.php?option=com_breezingforms&act=recordmanagement&txtsearch=<?php echo JRequest::getWord('txtsearch','false'); ?>&search=<?php echo htmlentities(JRequest::getVar('search',''), ENT_QUOTES, 'UTF-8'); ?>&form=<?php echo htmlentities(JRequest::getVar('form',''), ENT_QUOTES, 'UTF-8'); ?>&task=<?php echo JRequest::getVar('task',''); ?>&limitstart=<?php echo JRequest::getInt('limitstart',0); ?>&mylimit=<?php echo JRequest::getInt('mylimit',20); ?>&order=<?php echo JRequest::getVar('order', 'DESC') == 'DESC' ? 'ASC' : 'DESC'; ?>&orderBy=paypal_download_tries"><?php echo BFText::_('COM_BREEZINGFORMS_PAYMENT_DOWNLOAD_TRIES'); ?></a> </th> <th nowrap align="center"><?php echo BFText::_('COM_BREEZINGFORMS_RECORDS_VIEWED'); ?></th> <th nowrap align="center"><?php echo BFText::_('COM_BREEZINGFORMS_RECORDS_EXPORTED'); ?></th> <th nowrap align="center"><?php echo BFText::_('COM_BREEZINGFORMS_RECORDS_ARCHIVED'); ?></th> </tr> </thead> <?php $k = 0; $cnt = count( $rows ); for ($i=0; $i < $cnt; $i++) { $row = $rows[$i]; if ($row->viewed) $view_src = "components/com_breezingforms/images/icons/publish_g.png"; else $view_src = "components/com_breezingforms/images/icons/publish_x.png"; if ($row->exported) $exp_src = "components/com_breezingforms/images/icons/publish_g.png"; else $exp_src = "components/com_breezingforms/images/icons/publish_x.png"; if ($row->archived) $arch_src = "components/com_breezingforms/images/icons/publish_g.png"; else $arch_src = "components/com_breezingforms/images/icons/publish_x.png"; ?> <tr class="<?php echo "row$k"; ?>"> <td nowrap align="center"><input type="checkbox" id="cb<?php echo $i; ?>" name="ids[]" value="<?php echo $row->id; ?>" onclick="isChecked(this.checked);" /></td> <td nowrap align="left"><a href="#" onclick="return listItemTask('cb<?php echo $i; ?>','edit')"><?php echo $row->id; ?></a></td> <td nowrap align="left"><a href="#" onclick="return listItemTask('cb<?php echo $i; ?>','edit')"><?php echo $row->submitted; ?></a></td> <td nowrap align="left"><?php echo $row->ip; ?></td> <td nowrap align="left"><?php echo $row->provider; ?></td> <td nowrap align="left"><?php echo $row->title; ?></td> <td nowrap align="left"><?php echo $row->name; ?></td> <td nowrap align="left"><?php echo $row->paypal_tx_id; ?></td> <td nowrap align="left"><?php echo $row->paypal_payment_date; ?></td> <td nowrap align="left"><?php echo $row->paypal_testaccount ? BFText::_('COM_BREEZINGFORMS_YES') : BFText::_('COM_BREEZINGFORMS_NO'); ?></td> <td nowrap align="left"><?php echo $row->paypal_download_tries; ?></td> <td nowrap align="center"><a href="index.php?option=com_breezingforms&act=recordmanagement&txtsearch=<?php echo JRequest::getWord('txtsearch','false'); ?>&search=<?php echo htmlentities(JRequest::getVar('search',''), ENT_QUOTES, 'UTF-8'); ?>&form=<?php echo htmlentities(JRequest::getVar('form',''), ENT_QUOTES, 'UTF-8'); ?>&task=<?php echo JRequest::getVar('task',''); ?>&limitstart=<?php echo JRequest::getInt('limitstart',0); ?>&mylimit=<?php echo JRequest::getInt('mylimit',20); ?>&id=<?php echo $row->id ?>&viewed=<?php echo $row->viewed ?>&order=<?php echo JRequest::getWord('order','DESC') ?>&orderBy=<?php echo JRequest::getWord('orderBy','submitted') ?>"><img src="<?php echo $view_src; ?>" alt="+" border="0" /></a></td> <td nowrap align="center"><a href="index.php?option=com_breezingforms&act=recordmanagement&txtsearch=<?php echo JRequest::getWord('txtsearch','false'); ?>&search=<?php echo htmlentities(JRequest::getVar('search',''), ENT_QUOTES, 'UTF-8'); ?>&form=<?php echo htmlentities(JRequest::getVar('form',''), ENT_QUOTES, 'UTF-8'); ?>&task=<?php echo JRequest::getVar('task',''); ?>&limitstart=<?php echo JRequest::getInt('limitstart',0); ?>&mylimit=<?php echo JRequest::getInt('mylimit',20); ?>&id=<?php echo $row->id ?>&exported=<?php echo $row->exported ?>&order=<?php echo JRequest::getWord('order','DESC') ?>&orderBy=<?php echo JRequest::getWord('orderBy','submitted') ?>"><img src="<?php echo $exp_src; ?>" alt="+" border="0" /></a></td> <td nowrap align="center"><a href="index.php?option=com_breezingforms&act=recordmanagement&txtsearch=<?php echo JRequest::getWord('txtsearch','false'); ?>&search=<?php echo htmlentities(JRequest::getVar('search',''), ENT_QUOTES, 'UTF-8'); ?>&form=<?php echo htmlentities(JRequest::getVar('form',''), ENT_QUOTES, 'UTF-8'); ?>&task=<?php echo JRequest::getVar('task',''); ?>&limitstart=<?php echo JRequest::getInt('limitstart',0); ?>&mylimit=<?php echo JRequest::getInt('mylimit',20); ?>&id=<?php echo $row->id ?>&archived=<?php echo $row->archived ?>&order=<?php echo JRequest::getWord('order','DESC') ?>&orderBy=<?php echo JRequest::getWord('orderBy','submitted') ?>"><img src="<?php echo $arch_src; ?>" alt="+" border="0" /></a></td> </tr> <?php $k = 1 - $k; } ?> </table> </div> <input type="hidden" name="boxchecked" value="0" /> <input type="hidden" name="option" value="com_breezingforms" /> <input type="hidden" id="task" name="task" value="<?php echo JRequest::getVar('task',''); ?>" /> <input type="hidden" name="act" value="recordmanagement" /> <input type="hidden" name="status_update" value="0" /> <input type="hidden" name="order" value="<?php echo JRequest::getWord('order','DESC') ?>" /> <input type="hidden" name="orderBy" value="<?php echo JRequest::getWord('orderBy','submitted') ?>" /> <input type="hidden" id="limitstart" name="limitstart" value="<?php echo JRequest::getInt('limitstart',0); ?>" /> <input type="hidden" id="mylimit" name="mylimit" value="<?php echo JRequest::getInt('mylimit',20); ?>" /> <input type="hidden" id="exportt" name="exportt" value="0" /> </form> <table class="adminlist"> <tfoot> <tr> <td colspan="14"> <form action="#"> <?php echo $pagination->getListFooter() ?> </form> </td> </tr> </tfoot> </table> <script> // fixing limit, since it seems not to be available through JRequest or even $_POST/$_GET/$_REQUEST document.getElementById('limit').onchange = function(){ document.getElementById('mylimit').value = document.getElementById('limit').options[document.getElementById('limit').selectedIndex].value; document.adminForm.submit(); }; </script> <?php }