Example #1
0
             }
             $my_page = explode('.', $page);
             $modulename = $my_page[0];
             $pagename = $my_page[1];
             $_REQUEST['keyword'] = vmGet($_SESSION['session_userstate'], 'keyword');
             $_REQUEST['category_id'] = vmGet($_SESSION['session_userstate'], 'category_id');
             $_REQUEST['product_id'] = $product_id = $_SESSION['session_userstate']['product_id'];
         }
     } else {
         $vmLogger->debug("Could not include the class file {$class}");
     }
     if (!empty($vars["error"])) {
         $error = vmGet($vars, 'error');
     }
     if (!empty($error)) {
         echo vmCommonHTML::getErrorField($error);
     }
 } else {
     $no_last = 0;
     //$error="";
 }
 // If this is an asynchronous page load,
 // we clear the output buffer and just send the log messages.
 // the variable named 'ajax_request' has to be set to 1.
 if ($func && $ajax_request) {
     // Send an indicator wether the function call return true or false
     vmCommonHTML::getSuccessIndicator($ok, $vmDisplayLogger);
     $vm_mainframe->close(true);
     //die
 }
 if ($ok == true && empty($error) && !defined('_DONT_VIEW_PAGE') && !strstr($page, 'ajax')) {
	<?php 
    if ($db->f("order_status") == "P") {
        // Copy the db object to prevent it gets altered
        $db_temp = ps_DB::_clone($db);
        /** Start printing out HTML Form code (Payment Extra Info) **/
        ?>
	<table width="100%">
	  <tr>
	    <td width="100%" align="center">
	    <?php 
        @(include CLASSPATH . "payment/" . $dbpm->f("payment_class") . ".cfg.php");
        echo DEBUG ? vmCommonHTML::getInfoField('Beginning to parse the payment extra info code...') : '';
        // Here's the place where the Payment Extra Form Code is included
        // Thanks to Steve for this solution (why make it complicated...?)
        if (eval('?>' . $dbpm->f("payment_extrainfo") . '<?php ') === false) {
            echo vmCommonHTML::getErrorField("Error: The code of the payment method " . $dbpm->f('payment_method_name') . ' (' . $dbpm->f('payment_method_code') . ') ' . 'contains a Parse Error!<br />Please correct that first');
        }
        ?>
	    </td>
	  </tr>
	</table>
	<?php 
        $db = $db_temp;
    }
    // END printing out HTML Form code (Payment Extra Info)
    ?>
	<table border="0" cellspacing="0" cellpadding="2" width="100%">
	  <!-- begin customer information --> 
	  <tr class="sectiontableheader"> 
	    <th align="left" colspan="2"><?php 
    echo $VM_LANG->_('PHPSHOP_ACC_ORDER_INFO');
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See /administrator/components/com_virtuemart/COPYRIGHT.php for copyright notices and details.
*
* http://virtuemart.net
*/
mm_showMyFileName(__FILE__);
$theme = vmGet($_REQUEST, 'theme', 'default');
$themepath = $mosConfig_absolute_path . '/components/com_virtuemart/themes/' . basename($theme);
if (!file_exists($themepath)) {
    echo '<script type="text/javascript">alert(\'' . str_replace('{theme}', basename(shopMakeHtmlSafe($theme)), $VM_LANG->_('VM_ADMIN_THEME_NOT_EXISTS')) . '\');history.back();</script>';
    exit;
}
if (!file_exists($themepath . '/theme.config.php')) {
    if (!fopen($themepath . '/theme.config.php', 'w')) {
        echo vmCommonHTML::getErrorField($VM_LANG->_('VM_ADMIN_THEME_CFG_NOT_EXISTS'));
        return;
    }
}
$current_config = file_get_contents($themepath . '/theme.config.php');
$parameter_xml_file = $themepath . '/theme.xml';
// get params definitions
$params = new vmParameters($current_config, $parameter_xml_file, 'theme');
$title = '&nbsp;&nbsp;<img src="' . VM_THEMEURL . 'images/administration/header/icon-48-config.png" align="middle" border="0" alt="' . $VM_LANG->_('VM_ADMIN_CFG_THEME_SETTINGS') . '" />&nbsp;';
$title .= $VM_LANG->_('VM_ADMIN_CFG_THEME_SETTINGS');
//First create the object and let it print a form heading
$formObj = new formFactory($title);
//Then Start the form
$formObj->startForm();
$ps_html->writableIndicator($themepath . '/theme.config.php', 'text-align:left;width:78%;');
vmCommonHTML::loadExtjs();