예제 #1
0
         }
     }
     $template_files->save();
     $js->scripts = $template_files->get('mootools_js');
     foreach ($js->scripts as $key => $files) {
         $js->scripts[$key] = $this->registry->config->get('web_url', 'SERVER') . $files;
     }
     $js->dbug = false;
     $js->compress_file = true;
     $cache_file = $_SERVER['DOCUMENT_ROOT'] . '/Common/tmp/UthandoJsCache.js';
     $ftp = new File_FTP($this->registry);
     $script = $js->load_js();
     file_put_contents($cache_file, $script);
     if ($template_name == 'admin') {
         $dir = explode('/', $_SERVER['DOCUMENT_ROOT']);
         $ftp->put($cache_file, $ftp->public_html . '/' . end($dir) . '/templates/' . $template_name . '/js/UthandoJsCache.js', true, FTP_ASCII);
     } else {
         $ftp->put($cache_file, $ftp->public_html . '/templates/' . $template_name . '/js/UthandoJsCache.js', true, FTP_ASCII);
     }
     $ftp->disconnect();
     unlink($cache_file);
 }
 $menuBar = array('cancel' => '/admin/overview', 'save' => '');
 $this->content .= $this->makeToolbar($menuBar, 24);
 $this->content .= '<form id="mooTemplate" method="post" action="' . $_SERVER['REQUEST_URI'] . '">';
 $this->content .= '<select id="template_select" name="template">';
 foreach ($templates as $k => $t) {
     if ($template_name == $k) {
         $selected = 'selected="selected"';
     } else {
         $selected = null;
예제 #2
0
 $form->addElement('html', '</div></div>');
 $form->addElement('html', '<div id="display" class="morphtabs_panel"><div class="panel_content">');
 require_once 'ushop/params/frontend_display.php';
 require_once 'ushop/params/admin_display.php';
 $form->addElement('html', '</div></div>');
 if ($form->validate()) {
     $menuBar = array();
     // Apply form element filters.
     $form->freeze();
     $values = $form->process(array(&$this, 'formValues'));
     $ushop_ini = new Admin_Config($this->registry, array('path' => $this->registry->ini_dir . '/ushop.ini.php'));
     if ($values['information']) {
         $ftp = new File_FTP($this->registry);
         foreach ($values['information'] as $key => $value) {
             $message = file_put_contents($_SERVER['DOCUMENT_ROOT'] . '/tmp/' . $key . '.html', stripslashes(str_replace('\\r\\n', '', $value)));
             $ftp->put($_SERVER['DOCUMENT_ROOT'] . '/tmp/' . $key . '.html', $ftp->public_html . '/' . $this->registry->get('settings.resolve') . '/file/' . $key . '.html', true);
             unlink($_SERVER['DOCUMENT_ROOT'] . '/tmp/' . $key . '.html');
         }
         unset($values['information']);
         $ftp->disconnect();
     }
     foreach ($values as $section => $value) {
         foreach ($value as $key => $value) {
             $ushop_ini->set($key, $value, $section);
         }
     }
     $saved = $ushop_ini->save();
     $menuBar['back'] = '/ushop/overview';
     //check then enter the record.
     if ($saved) {
         $params['TYPE'] = 'pass';
예제 #3
0
 require_once 'ushop/params/paypal.php';
 $form->addElement('html', '</div></div>');
 $form->addElement('html', '<div id="display" class="morphtabs_panel"><div class="panel_content">');
 require_once 'ushop/params/frontend_display.php';
 require_once 'ushop/params/admin_display.php';
 $form->addElement('html', '</div></div>');
 if ($form->validate()) {
     // Apply form element filters.
     $form->freeze();
     $values = $form->process(array(&$this, 'formValues'));
     $ushop_ini = new Admin_Config($this->registry, array('path' => $this->registry->ini_dir . '/ushop.ini.php'));
     if ($values['information']) {
         $ftp = new File_FTP($this->registry);
         foreach ($values['information'] as $key => $value) {
             $message = file_put_contents($_SERVER['DOCUMENT_ROOT'] . '/Common/tmp/' . $key . '.html', stripslashes(str_replace('\\r\\n', '', $value)));
             $ftp->put($_SERVER['DOCUMENT_ROOT'] . '/Common/tmp/' . $key . '.html', $login['public_html'] . '/components/ushop/html/' . $key . '.html', true);
             unlink($_SERVER['DOCUMENT_ROOT'] . '/Common/tmp/' . $key . '.html');
         }
         unset($values['information']);
         $ftp->disconnect();
     }
     foreach ($values as $section => $value) {
         foreach ($value as $key => $value) {
             $ushop_ini->set($key, $value, $section);
         }
     }
     $saved = $ushop_ini->save();
     $menuBar['back'] = '/ushop/overview';
     //check then enter the record.
     if ($saved) {
         $params['TYPE'] = 'pass';