0byt3m1n1-V2
Path:
/
home
/
a
/
c
/
a
/
academiac
/
www
/
[
Home
]
File: country.tar
index.html 0000666 00000000000 15137453313 0006540 0 ustar 00 view.html.php 0000666 00000004374 15137453313 0007213 0 ustar 00 <?php /** * * Country View * * @package VirtueMart * @subpackage Country * @author RickG * @link http://www.virtuemart.net * @copyright Copyright (c) 2004 - 2010 VirtueMart Team. All rights reserved. * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php * VirtueMart is free software. This version may have been modified pursuant * to the GNU General Public License, and as distributed it includes or * is derivative of works licensed under the GNU General Public License or * other free or open source software licenses. * @version $Id: view.html.php 6307 2012-08-07 07:39:45Z alatak $ */ // Check to ensure this file is included in Joomla! defined('_JEXEC') or die('Restricted access'); // Load the view framework if(!class_exists('VmView'))require(JPATH_VM_ADMINISTRATOR.DS.'helpers'.DS.'vmview.php'); /** * HTML View class for maintaining the list of countries * * @package VirtueMart * @subpackage Country * @author RickG */ class VirtuemartViewCountry extends VmView { function display($tpl = null) { // Load the helper(s) if (!class_exists( 'VmConfig' )) require(JPATH_COMPONENT_ADMINISTRATOR.DS.'helpers'.DS.'config.php'); VmConfig::loadConfig(); VmConfig::loadJLang('com_virtuemart_countries'); if (!class_exists('VmHTML')) require(JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'html.php'); $model = VmModel::getModel('country'); $zoneModel = VmModel::getModel('worldzones'); $this->SetViewTitle(); $layoutName = JRequest::getWord('layout', 'default'); if ($layoutName == 'edit') { $country = $model->getData(); $this->assignRef('country', $country); $wzsList = $zoneModel->getWorldZonesSelectList(); $this->assignRef('worldZones', $wzsList ); $this->addStandardEditViewCommands(); } else { $this->addStandardDefaultViewCommands(true,false); //First the view lists, it sets the state of the model $this->addStandardDefaultViewLists($model,0,'ASC'); $filter_country = JRequest::getWord('filter_country', false); $countries = $model->getCountries(false, false, $filter_country); $this->assignRef('countries', $countries); $pagination = $model->getPagination(); $this->assignRef('pagination', $pagination); } parent::display($tpl); } } // pure php no closing tag tmpl/default.php 0000666 00000010707 15137453313 0007673 0 ustar 00 <?php /** * * Description * * @package VirtueMart * @subpackage Country * @author RickG * @link http://www.virtuemart.net * @copyright Copyright (c) 2004 - 2010 VirtueMart Team. All rights reserved. * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php * VirtueMart is free software. This version may have been modified pursuant * to the GNU General Public License, and as distributed it includes or * is derivative of works licensed under the GNU General Public License or * other free or open source software licenses. * @version $Id: default.php 6326 2012-08-08 14:14:28Z alatak $ */ // Check to ensure this file is included in Joomla! defined('_JEXEC') or die('Restricted access'); AdminUIHelper::startAdminArea($this); $states = JText::_('COM_VIRTUEMART_STATE_S'); ?> <form action="index.php" method="post" name="adminForm" id="adminForm"> <div id="header"> <div id="filterbox"> <table> <tr> <td align="left" width="100%"> <?php echo JText::_('COM_VIRTUEMART_FILTER') ?>: <input type="text" value="<?php echo JRequest::getVar('filter_country'); ?>" name="filter_country" size="25" /> <button onclick="this.form.submit();"><?php echo JText::_('COM_VIRTUEMART_GO'); ?></button> </td> </tr> </table> </div> <div id="resultscounter"><?php echo $this->pagination->getResultsCounter();?></div> </div> <div id="editcell"> <table class="adminlist" cellspacing="0" cellpadding="0"> <thead> <tr> <th width="10"> <input type="checkbox" name="toggle" value="" onclick="checkAll(<?php echo count($this->countries); ?>);" /> </th> <th> <?php echo $this->sort('country_name') ?> </th> <?php /* TODO not implemented <th> <?php echo JText::_('COM_VIRTUEMART_ZONE_ASSIGN_CURRENT_LBL'); ?> </th> */ ?> <th> <?php echo $this->sort('country_2_code') ?> </th> <th> <?php echo $this->sort('country_3_code') ?> </th> <th width="20"> <?php echo JText::_('COM_VIRTUEMART_PUBLISHED'); ?> </th> <th width="20"> <?php echo $this->sort('virtuemart_country_id') ?> </th> </tr> </thead> <?php $k = 0; for ($i=0, $n=count( $this->countries ); $i < $n; $i++) { $row = $this->countries[$i]; $checked = JHTML::_('grid.id', $i, $row->virtuemart_country_id); $published = JHTML::_('grid.published', $row, $i); $editlink = JROUTE::_('index.php?option=com_virtuemart&view=country&task=edit&cid[]=' . $row->virtuemart_country_id); $statelink = JROUTE::_('index.php?option=com_virtuemart&view=state&view=state&virtuemart_country_id=' . $row->virtuemart_country_id); ?> <tr class="row<?php echo $k ; ?>"> <td width="10"> <?php echo $checked; ?> </td> <td align="left"> <?php $prefix="COM_VIRTUEMART_COUNTRY_"; $country_string= Jtext::_($prefix.$row->country_3_code); ?> <a href="<?php echo $editlink; ?>"><?php echo $row->country_name ?> </a> <?php $lang =JFactory::getLanguage(); if ($lang->hasKey($prefix.$row->country_3_code)) { echo "(".$country_string.") "; } ?> <a title="<?php echo JText::sprintf('COM_VIRTUEMART_STATES_VIEW_LINK', $country_string ); ?>" href="<?php echo $statelink; ?>">[<?php echo $states ?>]</a> </td> <?php /* TODO not implemented <td align="left"> <?php echo $row->virtuemart_worldzone_id; ?> </td> */ ?> <td> <?php echo $row->country_2_code; ?> </td> <td> <?php echo $row->country_3_code ; ?> </td> <td align="center"> <?php echo $published; ?> </td> <td align="center"> <?php echo $row->virtuemart_country_id; ?> </td> </tr> <?php $k = 1 - $k; } ?> <tfoot> <tr> <td colspan="10"> <?php echo $this->pagination->getListFooter(); ?> </td> </tr> </tfoot> </table> </div> <input type="hidden" name="filter_order_Dir" value="<?php echo $this->lists['filter_order_Dir']; ?>" /> <input type="hidden" name="filter_order" value="<?php echo $this->lists['filter_order']; ?>" /> <input type="hidden" name="option" value="com_virtuemart" /> <input type="hidden" name="controller" value="country" /> <input type="hidden" name="view" value="country" /> <input type="hidden" name="task" value="" /> <input type="hidden" name="boxchecked" value="0" /> <?php echo JHTML::_( 'form.token' ); ?> </form> <?php AdminUIHelper::endAdminArea(); ?>