Exemplo n.º 1
0
<!-- left_navigation //-->
<?php 
require DIR_WS_INCLUDES . 'column_left.php';
?>
<!-- left_navigation_eof //-->
    </table></td>
<!-- body_text //-->
    <td width="100%" valign="top">
<?php 
if ($action == 'edit_page') {
    $parameters = array('pages_id' => '', 'pages_name' => '', 'pages_additional_description' => '', 'pages_description' => '', 'date_added' => '', 'pages_filename' => '', 'last_modified' => '');
    $pInfo = new objectInfo($parameters);
    if (isset($HTTP_GET_VARS['pID']) && empty($HTTP_POST_VARS)) {
        $page_query = tep_db_query("select * from " . TABLE_PAGES . " where pages_id = '" . (int) $HTTP_GET_VARS['pID'] . "' and language_id = '" . (int) $languages_id . "'");
        $page = tep_db_fetch_array($page_query);
        $pInfo->objectInfo($page);
    } elseif (tep_not_null($HTTP_POST_VARS)) {
        $pInfo->objectInfo($HTTP_POST_VARS);
        $pages_name = array_map("stripslashes", $HTTP_POST_VARS['pages_name']);
        $page_query = tep_db_query("select * from " . TABLE_PAGES . " where pages_id = '" . (int) $HTTP_GET_VARS['pID'] . "' and language_id = '" . (int) $languages_id . "'");
        $page = tep_db_fetch_array($page_query);
        $pInfo->pages_name = $page['pages_name'];
        $pInfo->pages_additional_description = $page['pages_additional_description'];
        $pInfo->pages_description = $page['pages_description'];
        $pInfo->pages_filename = $page['pages_filename'];
    }
    $languages = tep_get_languages();
    echo tep_draw_form('new_information', FILENAME_PAGES, 'pID=' . $HTTP_GET_VARS['pID'] . '&action=update_page', 'post');
    ?>
    <table border="0" width="100%" cellspacing="0" cellpadding="2">
      <tr>
Exemplo n.º 2
0
</td>
								</tr>
							</table></td>
					</tr>
<?php 
}
// legend
if ($action == 'new') {
    $form_action = 'insert';
    $parameters = array('expires_date' => '', 'date_scheduled' => '', 'banners_title' => '', 'banners_url' => '', 'banners_group' => '', 'banners_image' => '', 'banners_html_text' => '', 'expires_impressions' => '', 'banners_open_new_windows' => '', 'banners_on_ssl' => '');
    $bInfo = new objectInfo($parameters);
    if (isset($_GET['bID'])) {
        $form_action = 'update';
        $bID = zen_db_prepare_input($_GET['bID']);
        $banner = $db->Execute("select banners_title, banners_url, banners_image, banners_group,\n                                     banners_html_text, status,\n                                     date_format(date_scheduled, '%Y/%m/%d') as date_scheduled,\n                                     date_format(expires_date, '%Y/%m/%d') as expires_date,\n                                     expires_impressions, date_status_change, banners_open_new_windows, banners_on_ssl, banners_sort_order\n                                     from " . TABLE_BANNERS . "\n                                     where banners_id = '" . (int) $bID . "'");
        $bInfo->objectInfo($banner->fields);
    } elseif (zen_not_null($_POST)) {
        $bInfo->objectInfo($_POST);
    }
    if (!isset($bInfo->status)) {
        $bInfo->status = '1';
    }
    switch ($bInfo->status) {
        case '0':
            $is_status = false;
            $not_status = true;
            break;
        case '1':
            $is_status = true;
            $not_status = false;
            break;
Exemplo n.º 3
0
/**
 * @package admin
 * @copyright Copyright 2003-2011 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version $Id: collect_info.php 19330 2011-08-07 06:32:56Z drbyte $
 */
if (!defined('IS_ADMIN_FLAG')) {
    die('Illegal Access');
}
$parameters = array('products_name' => '', 'products_description' => '', 'products_url' => '', 'products_id' => '', 'products_quantity' => '', 'products_model' => '', 'products_image' => '', 'products_price' => '', 'products_virtual' => DEFAULT_PRODUCT_MUSIC_PRODUCTS_VIRTUAL, 'products_weight' => '', 'products_date_added' => '', 'products_last_modified' => '', 'products_date_available' => '', 'products_status' => '', 'products_tax_class_id' => DEFAULT_PRODUCT_MUSIC_TAX_CLASS_ID, 'manufacturers_id' => '', 'products_quantity_order_min' => '', 'products_quantity_order_units' => '', 'products_priced_by_attribute' => '', 'product_is_free' => '', 'product_is_call' => '', 'products_quantity_mixed' => '', 'product_is_always_free_shipping' => DEFAULT_PRODUCT_MUSIC_PRODUCTS_IS_ALWAYS_FREE_SHIPPING, 'products_qty_box_status' => PRODUCTS_QTY_BOX_STATUS, 'products_quantity_order_max' => '0', 'products_sort_order' => '0', 'products_discount_type' => '0', 'products_discount_type_from' => '0', 'products_price_sorter' => '0', 'master_categories_id' => '');
$pInfo = new objectInfo($parameters);
if (isset($_GET['pID']) && empty($_POST)) {
    $product = $db->Execute("select pd.products_name, pd.products_description, pd.products_url,\r\n                                      p.products_id, p.products_quantity, p.products_model,\r\n                                      p.products_image, p.products_price, p.products_virtual, p.products_weight,\r\n                                      p.products_date_added, p.products_last_modified,\r\n                                      date_format(p.products_date_available, '%Y-%m-%d') as\r\n                                      products_date_available, p.products_status, p.products_tax_class_id,\r\n                                      pe.artists_id, pe.record_company_id,pe.music_genre_id,\r\n                                      p.products_quantity_order_min, p.products_quantity_order_units, p.products_priced_by_attribute,\r\n                                      p.product_is_free, p.product_is_call, p.products_quantity_mixed,\r\n                                      p.product_is_always_free_shipping, p.products_qty_box_status, p.products_quantity_order_max,\r\n                                      p.products_sort_order,\r\n                                      p.products_discount_type, p.products_discount_type_from,\r\n                                      p.products_price_sorter, p.master_categories_id\r\n                              from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd,\r\n                                   " . TABLE_PRODUCT_MUSIC_EXTRA . " pe\r\n                              where p.products_id = '" . (int) $_GET['pID'] . "'\r\n                              and p.products_id = pd.products_id and p.products_id = pe.products_id\r\n                              and pd.language_id = '" . (int) $_SESSION['languages_id'] . "'");
    $pInfo->objectInfo($product->fields);
} elseif (zen_not_null($_POST)) {
    $pInfo->objectInfo($_POST);
    $products_name = $_POST['products_name'];
    $products_description = $_POST['products_description'];
    $products_url = $_POST['products_url'];
}
$artists_array = array(array('id' => '', 'text' => TEXT_NONE));
$artists = $db->Execute("select artists_id, artists_name\r\n                                   from " . TABLE_RECORD_ARTISTS . " order by artists_name");
while (!$artists->EOF) {
    $artists_array[] = array('id' => $artists->fields['artists_id'], 'text' => $artists->fields['artists_name']);
    $artists->MoveNext();
}
$record_company_array = array(array('id' => '', 'text' => TEXT_NONE));
$record_company = $db->Execute("select record_company_id, record_company_name\r\n                                   from " . TABLE_RECORD_COMPANY . " order by record_company_name");
while (!$record_company->EOF) {
Exemplo n.º 4
0
require DIR_WS_INCLUDES . 'column_left.php';
?>
<!-- left_navigation_eof //-->
    </table></td>
<!-- body_text //-->
    <td width="100%" valign="top">
<?php 
if ($action == 'new_product') {
    $parameters = array('products_name' => '', 'products_description' => '', 'products_spec' => '', 'products_url' => '', 'products_id' => '', 'products_quantity' => '', 'products_model' => '', 'products_image' => '', 'products_image_med' => '', 'products_image_lrg' => '', 'products_image_sm_1' => '', 'products_image_xl_1' => '', 'products_image_sm_2' => '', 'products_image_xl_2' => '', 'products_image_sm_3' => '', 'products_image_xl_3' => '', 'products_image_sm_4' => '', 'products_image_xl_4' => '', 'products_image_sm_5' => '', 'products_image_xl_5' => '', 'products_image_sm_6' => '', 'products_image_xl_6' => '', 'products_price' => '', 'products_weight' => '', 'products_date_added' => '', 'products_last_modified' => '', 'products_date_available' => '', 'products_status' => '', 'products_tax_class_id' => '', 'manufacturers_id' => '');
    $pInfo = new objectInfo($parameters);
    //HTC BOC and MaxiDVD: Modified For Ultimate Images Pack!
    if (isset($_GET['pID']) && !$_POST) {
        $product_query = tep_db_query("select pd.products_name, pd.products_description, pd.products_spec, pd.products_head_title_tag, pd.products_head_desc_tag, pd.products_head_keywords_tag, pd.products_url, p.products_id, p.products_quantity, p.products_model, p.products_image, p.products_image_med, p.products_image_lrg, p.products_image_sm_1, p.products_image_xl_1, p.products_image_sm_2, p.products_image_xl_2, p.products_image_sm_3, p.products_image_xl_3, p.products_image_sm_4, p.products_image_xl_4, p.products_image_sm_5, p.products_image_xl_5, p.products_image_sm_6, p.products_image_xl_6, p.products_price, p.products_weight, p.products_date_added, p.products_last_modified, date_format(p.products_date_available, '%Y-%m-%d') as products_date_available, p.products_status, p.products_tax_class_id, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . (int) $_GET['pID'] . "' and p.products_id = pd.products_id and pd.language_id = '" . (int) $languages_id . "'");
        $product = tep_db_fetch_array($product_query);
        //HTC EOC
        $pInfo->objectInfo($product);
    } elseif (tep_not_null($_POST)) {
        $pInfo->objectInfo($_POST);
        $products_name = $_POST['products_name'];
        $products_description = $_POST['products_description'];
        $products_spec = $_POST['products_spec'];
        $products_url = $_POST['products_url'];
    }
    $manufacturers_array = array(array('id' => '', 'text' => TEXT_NONE));
    $manufacturers_query = tep_db_query("select manufacturers_id, manufacturers_name from " . TABLE_MANUFACTURERS . " order by manufacturers_name");
    while ($manufacturers = tep_db_fetch_array($manufacturers_query)) {
        $manufacturers_array[] = array('id' => $manufacturers['manufacturers_id'], 'text' => $manufacturers['manufacturers_name']);
    }
    $tax_class_array = array(array('id' => '0', 'text' => TEXT_NONE));
    $tax_class_query = tep_db_query("select tax_class_id, tax_class_title from " . TABLE_TAX_CLASS . " order by tax_class_title");
    while ($tax_class = tep_db_fetch_array($tax_class_query)) {
Exemplo n.º 5
0
?>
          </td>
          </tr>
        </table></td>
      </tr>
<?php 
if ($action == 'new') {
    $form_action = 'insert';
    $parameters = array('pages_title' => '', 'page_open_new_window' => '', 'page_is_ssl' => '', 'pages_html_text' => '', 'alt_url' => '', 'alt_url_external' => '', 'header_sort_order' => '', 'sidebox_sort_order' => '', 'footer_sort_order' => '', 'toc_sort_order' => '', 'toc_chapter' => '', 'status_header' => '', 'status_sidebox' => '', 'status_footer' => '', 'status_toc' => '', 'page_open_new_window' => '', 'page_is_ssl' => '');
    $ezInfo = new objectInfo($parameters);
    if (isset($_GET['ezID'])) {
        $form_action = 'update';
        $ezID = zen_db_prepare_input($_GET['ezID']);
        $page_query = "select * from " . TABLE_EZPAGES . " where pages_id = '" . $_GET['ezID'] . "'";
        $page = $db->Execute($page_query);
        $ezInfo->objectInfo($page->fields);
    } elseif (zen_not_null($_POST)) {
        $ezInfo->objectInfo($_POST);
    }
    // set all status settings and switches
    if (!isset($ezInfo->status_header)) {
        $ezInfo->status_header = '1';
    }
    switch ($ezInfo->status_header) {
        case '0':
            $is_status_header = false;
            $not_status_header = true;
            break;
        case '1':
            $is_status_header = true;
            $not_status_header = false;
Exemplo n.º 6
0
<!-- left_navigation //-->
<?php 
require DIR_WS_INCLUDES . 'column_left.php';
?>
<!-- left_navigation_eof //-->
    </table></td>
<!-- body_text //-->
    <td width="100%" valign="top">
<?php 
if ($action == 'edit' || $action == 'new') {
    $parameters = array('manufacturers_name' => '', 'manufacturers_description' => '', 'manufacturers_id' => '', 'manufacturers_image' => '', 'date_added' => '', 'last_modified' => '');
    $mInfo = new objectInfo($parameters);
    if (tep_not_null($HTTP_GET_VARS['mID']) && empty($HTTP_POST_VARS)) {
        $manufacturer_query = tep_db_query("select m.*, mi.* from " . TABLE_MANUFACTURERS . " m, " . TABLE_MANUFACTURERS_INFO . " mi where m.manufacturers_id = '" . (int) $HTTP_GET_VARS['mID'] . "' and m.manufacturers_id = mi.manufacturers_id and mi.languages_id = '" . (int) $languages_id . "'");
        $manufacturer = tep_db_fetch_array($manufacturer_query);
        $mInfo->objectInfo($manufacturer);
    } elseif (tep_not_null($HTTP_POST_VARS)) {
        $mInfo->objectInfo($HTTP_POST_VARS);
        $manufacturers_name = array_map("stripslashes", $HTTP_POST_VARS['manufacturers_name']);
        $manufacturers_description = array_map("stripslashes", $HTTP_POST_VARS['manufacturers_description']);
    }
    $languages = tep_get_languages();
    $form_action = tep_not_null($HTTP_GET_VARS['mID']) ? 'save' : 'insert';
    echo tep_draw_form('manufacturers', FILENAME_MANUFACTURERS, tep_get_all_get_params(array('mID', 'action')) . (tep_not_null($HTTP_GET_VARS['mID']) ? '&mID=' . $HTTP_GET_VARS['mID'] : '') . '&action=' . $form_action, 'post', 'enctype="multipart/form-data"') . tep_draw_hidden_field('manufacturers_id', $mInfo->manufacturers_id);
    ?>
    <table border="0" width="100%" cellspacing="0" cellpadding="2">
      <tr>
        <td class="pageHeading"><?php 
    echo $form_action == 'save' ? sprintf(TEXT_HEADING_EDIT_MANUFACTURER, $mInfo->manufacturers_name) : TEXT_HEADING_NEW_MANUFACTURER;
    ?>
</td>
Exemplo n.º 7
0
</td>
            <td class="pageHeading" align="right">&nbsp;</td>
          </tr>
        </table></td>
      </tr>
<?php 
if ($action == 'new') {
    $form_action = 'insert';
    $parameters = array('title' => '', 'content' => '', 'module' => '');
    $nInfo = new objectInfo($parameters);
    if (isset($_GET['nID'])) {
        $form_action = 'update';
        $nID = tep_db_prepare_input($_GET['nID']);
        $newsletter_query = tep_db_query("select title, content, module from " . TABLE_NEWSLETTERS . " where newsletters_id = '" . (int) $nID . "'");
        $newsletter = tep_db_fetch_array($newsletter_query);
        $nInfo->objectInfo($newsletter);
    } elseif ($_POST) {
        $nInfo->objectInfo($_POST);
    }
    $file_extension = substr($PHP_SELF, strrpos($PHP_SELF, '.'));
    $directory_array = array();
    if ($dir = dir(DIR_WS_MODULES . 'newsletters/')) {
        while ($file = $dir->read()) {
            if (!is_dir(DIR_WS_MODULES . 'newsletters/' . $file)) {
                if (substr($file, strrpos($file, '.')) == $file_extension) {
                    $directory_array[] = $file;
                }
            }
        }
        sort($directory_array);
        $dir->close();
Exemplo n.º 8
0
<!-- left_navigation //-->
<?php 
require DIR_WS_INCLUDES . 'column_left.php';
?>
<!-- left_navigation_eof //-->
    </table></td>
<!-- body_text //-->
    <td width="100%" valign="top">
<?php 
if ($action == 'new_news') {
    $parameters = array('news_title' => '', 'source' => '', 'sort_order' => '', 'news_categories_id' => '', 'date_added' => '', 'news_content' => '', 'news_status' => '', 'icon' => '');
    $nInfo = new objectInfo($parameters);
    if (isset($HTTP_GET_VARS['nID']) && empty($HTTP_POST_VARS)) {
        $news_query = tep_db_query("select n.news_id, n.news_title, n.news_content, n.source, n.icon, n.sort_order, n.news_categories_id, n.news_status, n.date_added from " . TABLE_NEWS . " n where n.news_id = '" . (int) $HTTP_GET_VARS['nID'] . "'");
        $news = tep_db_fetch_array($news_query);
        $nInfo->objectInfo($news);
    } elseif (tep_not_null($HTTP_POST_VARS)) {
        $nInfo->objectInfo($HTTP_POST_VARS);
        //      $products_name = $HTTP_POST_VARS['products_name'];
        //      $products_description = $HTTP_POST_VARS['products_description'];
        //      $products_url = $HTTP_POST_VARS['products_url'];
        //	  $news_title = $HTTP_POST_VARS['news_title'];
        //	  $news_content = $HTTP_POST_VARS['news_content'];
        //	  $news_icon_name = $HTTP_POST_VARS['icon'];
    }
    if (!isset($nInfo->news_status)) {
        $nInfo->news_status = '1';
    }
    switch ($nInfo->news_status) {
        case '0':
            $checked_status = false;
Exemplo n.º 9
0
<!-- left_navigation //-->
<?php 
require DIR_WS_INCLUDES . 'column_left.php';
?>
<!-- left_navigation_eof //-->
    </table></td>
<!-- body_text //-->
    <td width="100%" valign="top">
<?php 
if ($action == 'edit_message' || $action == 'new_message') {
    $parameters = array('messages_name' => '', 'messages_description' => '', 'messages_id' => '', 'date_added' => '', 'last_modified' => '', 'status' => '', 'messages_pages' => array(), 'sort_order' => '');
    $mInfo = new objectInfo($parameters);
    if (isset($HTTP_GET_VARS['mID']) && empty($HTTP_POST_VARS)) {
        $message_query = tep_db_query("select * from " . TABLE_MESSAGES . " where messages_id = '" . (int) $HTTP_GET_VARS['mID'] . "'");
        $message = tep_db_fetch_array($message_query);
        $mInfo->objectInfo($message);
        if (tep_not_null($mInfo->messages_pages)) {
            $mInfo->messages_pages = explode("\n", $mInfo->messages_pages);
        } else {
            $mInfo->messages_pages = array();
        }
    } elseif (tep_not_null($HTTP_POST_VARS)) {
        $mInfo->objectInfo($HTTP_POST_VARS);
    }
    if (!isset($mInfo->status)) {
        $mInfo->status = '1';
    }
    switch ($mInfo->status) {
        case '0':
            $in_status = false;
            $out_status = true;
Exemplo n.º 10
0
 }
 $bInfo = new objectInfo($parameters);
 if (isset($HTTP_GET_VARS['bID']) && empty($HTTP_POST_VARS)) {
     if ($tPath == '0') {
         $block_query = tep_db_query("select * from " . TABLE_BLOCKS . " where blocks_id = '" . (int) $HTTP_GET_VARS['bID'] . "' and language_id = '" . (int) $languages_id . "'");
     } else {
         $block_query = tep_db_query("select b.*, if (bt.blocks_types_field='textarea_text', b.blocks_description, b.blocks_description_short) as blocks_description from " . TABLE_BLOCKS . " b, " . TABLE_BLOCKS_TYPES . " bt where b.blocks_id = '" . (int) $HTTP_GET_VARS['bID'] . "' and b.blocks_types_id = bt.blocks_types_id and b.language_id = bt.language_id and b.language_id = '" . (int) $languages_id . "'");
     }
     $block = tep_db_fetch_array($block_query);
     $block['templates'] = array();
     $templates = array();
     $templates_query = tep_db_query("select distinct templates_id from " . TABLE_TEMPLATES_TO_BLOCKS . " where blocks_id = '" . (int) $block['blocks_id'] . "'");
     while ($templates_array = tep_db_fetch_array($templates_query)) {
         $block['templates'][] = $templates_array['templates_id'];
     }
     $bInfo->objectInfo($block);
 } elseif (tep_not_null($HTTP_POST_VARS)) {
     $bInfo->objectInfo($HTTP_POST_VARS);
     $blocks_name = array_map("stripslashes", $HTTP_POST_VARS['blocks_name']);
     $blocks_description = array_map("stripslashes", $HTTP_POST_VARS['blocks_description']);
 }
 if (!is_array($bInfo->templates)) {
     $bInfo->templates = array();
 }
 $languages = tep_get_languages();
 $form_action = isset($HTTP_GET_VARS['bID']) ? 'update_block' : 'insert_block';
 echo tep_draw_form('blocks', FILENAME_BLOCKS, 'type=' . $type . '&tPath=' . $tPath . (isset($HTTP_GET_VARS['bID']) ? '&bID=' . $HTTP_GET_VARS['bID'] : '') . '&action=' . $form_action, 'post', 'enctype="multipart/form-data"');
 ?>
 <table border="0" width="100%" cellspacing="0" cellpadding="2">
   <tr>
     <td class="pageHeading"><?php 
Exemplo n.º 11
0
<?php 
require DIR_WS_INCLUDES . 'column_left.php';
?>
<!-- left_navigation_eof //-->
    </table></td>
<!-- body_text //-->
    <td width="100%" valign="top">

<?php 
if ($action == 'new_page') {
    $parameters = array('pages_name' => '', 'pages_title' => '', 'pages_body' => '', 'pages_id' => '', 'pages_image' => '', 'pages_status' => '', 'sort_order' => '');
    $pInfo = new objectInfo($parameters);
    if (isset($_GET['pID']) && empty($_POST)) {
        $page_query = tep_db_query("select pd.pages_title, pd.pages_body, p.pages_id, p.pages_name, p.pages_image, p.pages_status, p.sort_order from " . TABLE_PAGES . " p, " . TABLE_PAGES_DESCRIPTION . " pd where p.pages_id = '" . (int) $_GET['pID'] . "' and p.pages_id = pd.pages_id and pd.language_id = '" . (int) $languages_id . "'");
        $page = tep_db_fetch_array($page_query);
        $pInfo->objectInfo($page);
    } elseif (tep_not_null($_POST)) {
        $pInfo->objectInfo($_POST);
        $pages_name = $_POST['pages_name'];
        $pages_title = $_POST['pages_title'];
        $pages_body = $_POST['pages_body'];
    }
    $languages = tep_get_languages();
    if (!isset($pInfo->pages_status)) {
        $pInfo->pages_status = '1';
    }
    switch ($pInfo->pages_status) {
        case '0':
            $in_status = false;
            $out_status = true;
            break;
		</td>
	</tr>
<?php 
//uncommment 'new newsletter' button below to activate
if ($action == 'new') {
    $form_action = 'insert';
    $parameters = array('title' => $title, 'htmlcontent' => $htmlcontent, 'txtcontent' => $txtcontent, 'template' => $template);
    $nInfo = new objectInfo($parameters);
    if (isset($HTTP_GET_VARS['nID'])) {
        $form_action = 'update';
        $nID = tep_db_prepare_input($HTTP_GET_VARS['nID']);
        $mail_query = tep_db_query("select title, htmlcontent, txtcontent, placeholders, template, status from " . TABLE_MM_RESPONSEMAIL . " where mail_id = '" . (int) $nID . "'");
        $mail = tep_db_fetch_array($mail_query);
        $placeholders = $mail['placeholders'];
        $template_title = $mail['template'];
        $nInfo->objectInfo($mail);
    } elseif ($HTTP_POST_VARS) {
        $nInfo->objectInfo($HTTP_POST_VARS);
    }
    ?>

	<tr>
		<td><?php 
    echo tep_draw_separator('pixel_trans.gif', '1', '10');
    ?>
</td>
	</tr>
     <tr>
     	<td><?php 
    echo tep_draw_form('mail', FILENAME_MM_RESPONSEMAIL, (isset($HTTP_GET_VARS['page']) ? 'page=' . $HTTP_GET_VARS['page'] . '&' : '') . 'action=' . $form_action);
    if ($form_action == 'update') {
Exemplo n.º 13
0
// +----------------------------------------------------------------------+
// | This source file is subject to version 2.0 of the GPL license,       |
// | that is bundled with this package in the file LICENSE, and is        |
// | available through the world-wide-web at the following url:           |
// | http://www.zen-cart.com/license/2_0.txt.                             |
// | If you did not receive a copy of the zen-cart license and are unable |
// | to obtain it through the world-wide-web, please send a note to       |
// | license@zen-cart.com so we can mail you a copy immediately.          |
// +----------------------------------------------------------------------+
//  $Id: collect_info.php 277 2004-09-10 23:03:52Z wilt $
//
$parameters = array('faqs_contact_name' => '', 'faqs_contact_mail' => '', 'faqs_name' => '', 'faqs_description' => '', 'faqs_answer' => '', 'faqs_url' => '', 'faqs_id' => '', 'faqs_image' => '', 'faqs_date_added' => '', 'faqs_last_modified' => '', 'faqs_status' => '', 'faqs_sort_order' => '0', 'master_faq_categories_id' => '');
$pInfo = new objectInfo($parameters);
if (isset($_GET['pID']) && empty($_POST)) {
    $faq = $db->Execute("select pd.faqs_name, pd.faqs_description, pd.faqs_answer, pd.faqs_url, pd.faqs_contact_name, pd.faqs_contact_mail,\n                                      p.faqs_id,\n                                      p.faqs_image,\n                                      p.faqs_date_added, p.faqs_last_modified,\n                                      p.faqs_status, \n                                      p.faqs_sort_order,\n                                      p.master_faq_categories_id\n                              from " . TABLE_FAQS . " p, " . TABLE_FAQS_DESCRIPTION . " pd\n                              where p.faqs_id = '" . (int) $_GET['pID'] . "'\n                              and p.faqs_id = pd.faqs_id\n                              and pd.language_id = '" . (int) $_SESSION['languages_id'] . "'");
    $pInfo->objectInfo($faq->fields);
} elseif (zen_not_null($_POST)) {
    $pInfo->objectInfo($_POST);
    $faqs_name = $_POST['faqs_contact_name'];
    $faqs_contact_name = $_POST['faqs_contact_mail'];
    $faqs_contact_mail = $_POST['faqs_name'];
    $faqs_description = $_POST['faqs_description'];
    $faqs_answer = $_POST['faqs_answer'];
    $faqs_url = $_POST['faqs_url'];
    $faqs_notify = $_POST['faqs_notify'];
}
$languages = zen_get_languages();
if (!isset($pInfo->faqs_status)) {
    $pInfo->faqs_status = '1';
}
switch ($pInfo->faqs_status) {
Exemplo n.º 14
0
<!-- left_navigation //-->
<?php 
require DIR_WS_INCLUDES . 'column_left.php';
?>
<!-- left_navigation_eof //-->
    </table></td>
<!-- body_text //-->
    <td width="100%" valign="top">
<?php 
if ($action == 'edit_type' || $action == 'new_type') {
    $parameters = array('products_types_name' => '', 'products_types_description' => '', 'products_types_id' => '', 'date_added' => '', 'last_modified' => '', 'products_types_status' => '', 'products_types_path' => '', 'sort_order' => '', 'products_types_letter_search' => '0');
    $tInfo = new objectInfo($parameters);
    if (isset($HTTP_GET_VARS['tID']) && empty($HTTP_POST_VARS)) {
        $type_query = tep_db_query("select * from " . TABLE_PRODUCTS_TYPES . " where products_types_id = '" . (int) $HTTP_GET_VARS['tID'] . "' and language_id = '" . (int) $languages_id . "'");
        $type = tep_db_fetch_array($type_query);
        $tInfo->objectInfo($type);
    } elseif (tep_not_null($HTTP_POST_VARS)) {
        $tInfo->objectInfo($HTTP_POST_VARS);
        $products_types_name = $HTTP_POST_VARS['products_types_name'];
        $products_types_description = $HTTP_POST_VARS['products_types_description'];
    }
    $languages = tep_get_languages();
    if (!isset($tInfo->products_types_letter_search)) {
        $tInfo->products_types_letter_search = '0';
    }
    switch ($tInfo->products_types_letter_search) {
        case '1':
            $in_listing_status = true;
            $out_listing_status = false;
            break;
        case '0':
Exemplo n.º 15
0
echo OSCOM::getDef('heading_title');
?>
</a></h2>

<?php 
if (!empty($action)) {
    if ($action == 'new') {
        $show_listing = false;
        $form_action = 'insert';
        $parameters = array('expires_date' => '', 'date_scheduled' => '', 'banners_title' => '', 'banners_url' => '', 'banners_group' => '', 'banners_image' => '', 'banners_html_text' => '', 'expires_impressions' => '');
        $bInfo = new objectInfo($parameters);
        if (isset($_GET['bID'])) {
            $form_action = 'update';
            $bID = HTML::sanitize($_GET['bID']);
            $Qbanner = $OSCOM_Db->get('banners', ['banners_title', 'banners_url', 'banners_image', 'banners_group', 'banners_html_text', 'status', 'date_format(date_scheduled, "%Y-%m-%d") as date_scheduled', 'date_format(expires_date, "%Y-%m-%d") as expires_date', 'expires_impressions', 'date_status_change'], ['banners_id' => (int) $bID]);
            $bInfo->objectInfo($Qbanner->toArray());
        } elseif (tep_not_null($_POST)) {
            $bInfo->objectInfo($_POST);
        }
        $groups_array = [];
        $Qgroups = $OSCOM_Db->get('banners', 'distinct banners_group', null, 'banners_group');
        while ($Qgroups->fetch()) {
            $groups_array[] = ['id' => $Qgroups->value('banners_group'), 'text' => $Qgroups->value('banners_group')];
        }
        ?>

<?php 
        echo HTML::form('new_banner', OSCOM::link(FILENAME_BANNER_MANAGER, 'page=' . $_GET['page'] . '&action=' . $form_action), 'post', 'enctype="multipart/form-data"') . ($form_action == 'update' ? HTML::hiddenField('banners_id', $bID) : '');
        ?>

<div class="panel panel-info">
Exemplo n.º 16
0
?>
</td>
                 </tr>
               </table>
			 </td>
           </tr>
           <?php 
if ($action == 'new') {
    $form_action = 'insert';
    $parameters = array('news_title' => '', 'news_content' => '', 'news_added_date' => '', 'news_modified_date' => '', 'news_start_date' => '', 'news_end_date' => '', 'more_news_page' => '');
    $nInfo = new objectInfo($parameters);
    if (isset($_GET['nID'])) {
        $form_action = 'update';
        $nID = zen_db_prepare_input($_GET['nID']);
        $news = $db->Execute("select nc.news_title, nc.news_content, n.more_news_page,\r\n                                         date_format(n.news_added_date, '%Y-%m-%d') as news_added_date,\r\n                                         date_format(n.news_modified_date, '%Y-%m-%d') as news_modified_date,\r\n                                         date_format(n.news_start_date, '%Y-%m-%d') as news_start_date,\r\n                                         date_format(n.news_end_date, '%Y-%m-%d') as news_end_date\r\n\t\t                               from " . TABLE_BOX_NEWS_CONTENT . " nc, " . TABLE_BOX_NEWS . " n \r\n\t\t                               where n.box_news_id = '" . (int) $nID . "'");
        $nInfo->objectInfo($news->fields);
    } elseif ($_POST) {
        $nInfo->objectInfo($_POST);
    }
    ?>
           <link rel="stylesheet" type="text/css" href="includes/javascript/spiffyCal/spiffyCal_v2_1.css">
           <script language="JavaScript" src="includes/javascript/spiffyCal/spiffyCal_v2_1.js"></script>
           <script language="javascript">
		   <!--
           var dateNewsStart = new ctlSpiffyCalendarBox("dateNewsStart", "news", "news_start_date","btnDate1","<?php 
    echo $nInfo->news_start_date;
    ?>
",scBTNMODE_CUSTOMBLUE);
           var dateNewsEnd = new ctlSpiffyCalendarBox("dateNewsEnd", "news", "news_end_date","btnDate2","<?php 
    echo $nInfo->news_end_date;
    ?>
Exemplo n.º 17
0
?>
</td>
          </tr>
        </table></td>
      </tr>
<?php 
if ($action == 'new') {
    $form_action = 'insert';
    $parameters = array('expires_date' => '', 'date_scheduled' => '', 'banners_title' => '', 'banners_url' => '', 'banners_group' => '', 'banners_image' => '', 'banners_html_text' => '', 'expires_impressions' => '');
    $bInfo = new objectInfo($parameters);
    if (isset($HTTP_GET_VARS['bID'])) {
        $form_action = 'update';
        $bID = tep_db_prepare_input($HTTP_GET_VARS['bID']);
        $banner_query = tep_db_query("select banners_title, banners_url, banners_image, banners_group, banners_html_text, status, date_format(date_scheduled, '%d/%m/%Y') as date_scheduled, date_format(expires_date, '%d/%m/%Y') as expires_date, expires_impressions, date_status_change from " . TABLE_BANNERS . " where banners_id = '" . (int) $bID . "'");
        $banner = tep_db_fetch_array($banner_query);
        $bInfo->objectInfo($banner);
    } elseif (tep_not_null($HTTP_POST_VARS)) {
        $bInfo->objectInfo($HTTP_POST_VARS);
    }
    $groups_array = array();
    $groups_query = tep_db_query("select distinct banners_group from " . TABLE_BANNERS . " order by banners_group");
    while ($groups = tep_db_fetch_array($groups_query)) {
        $groups_array[] = array('id' => $groups['banners_group'], 'text' => $groups['banners_group']);
    }
    ?>
<link rel="stylesheet" type="text/css" href="includes/javascript/spiffyCal/spiffyCal_v2_1.css">
<script language="JavaScript" src="includes/javascript/spiffyCal/spiffyCal_v2_1.js"></script>
<script language="javascript">
  var dateExpires = new ctlSpiffyCalendarBox("dateExpires", "new_banner", "expires_date","btnDate1","<?php 
    echo $bInfo->expires_date;
    ?>
Exemplo n.º 18
0
        $g_session->close();
        break;
    default:
        break;
}
require DIR_FS_OBJECTS . 'html_start_sub1.php';
require DIR_FS_OBJECTS . 'html_start_sub2.php';
if ($action == 'new_template') {
    $parameters = array('template_id' => '', 'group_id' => TEMPLATE_SYSTEM_GROUP, 'template_title' => '', 'template_subject' => '', 'template_content' => $template_content);
    $tInfo = new objectInfo($parameters);
    $groups_query = "select group_id as id, group_title as text from " . TABLE_TEMPLATES_GROUPS . " order by group_title";
    $groups_array = $g_db->query_to_array($groups_query);
    if (!empty($tID)) {
        $template_query = $g_db->query("select template_id, group_id, template_title, template_subject, template_content from " . TABLE_TEMPLATES . " where template_id = '" . (int) $tID . "'");
        $template = $g_db->fetch_array($template_query);
        $tInfo->objectInfo($template, false);
        if (!empty($template_content)) {
            $tInfo->template_content = $template_content;
        }
    }
    if (!empty($tID)) {
        $form_action = 'tID=' . $tID . '&action=template_upload';
    } else {
        $form_action = 'action=template_upload';
    }
    ?>
        <div class="maincell wider">
          <div class="comboHeadingTop">
            <div class="rspacer floater help_page"><?php 
    echo '<a href="' . tep_href_link($g_script, 'action=help&ajax=edit') . '" class="heading_help" title="' . HEADING_TITLE . '" target="_blank">' . tep_image(DIR_WS_ICONS . 'icon_help_32.png', HEADING_TITLE) . '</a>';
    ?>
Exemplo n.º 19
0
</td>
      </tr>
      <tr>
        <td align="right" class="main"><?php 
    echo tep_image_submit('button_update.gif', IMAGE_UPDATE) . ' <a href="' . tep_href_link(FILENAME_BOARDS, tep_get_all_get_params(array('action'))) . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>';
    ?>
</td>
      </tr></form>
<?php 
} elseif ($action == 'new_category' || $action == 'edit_category') {
    $parameters = array('boards_categories_name' => '', 'boards_categories_description' => '', 'boards_categories_id' => '', 'image' => '', 'date_added' => '', 'last_modified' => '', 'status' => '', 'boards_categories_path' => '');
    $cInfo = new objectInfo($parameters);
    if (isset($HTTP_GET_VARS['cID']) && empty($HTTP_POST_VARS)) {
        $boards_category_query = tep_db_query("select * from " . TABLE_BOARDS_CATEGORIES . " where boards_categories_id = '" . (int) $HTTP_GET_VARS['cID'] . "' and language_id = '" . (int) $languages_id . "'");
        $boards_category = tep_db_fetch_array($boards_category_query);
        $cInfo->objectInfo($boards_category);
    } elseif (tep_not_null($HTTP_POST_VARS)) {
        $cInfo->objectInfo($HTTP_POST_VARS);
        $boards_categories_name = $HTTP_POST_VARS['boards_categories_name'];
        $boards_categories_description = $HTTP_POST_VARS['boards_categories_description'];
    }
    $languages = tep_get_languages();
    if (!isset($cInfo->status)) {
        $cInfo->status = '1';
    }
    switch ($cInfo->status) {
        case '0':
            $in_status = false;
            $out_status = true;
            break;
        case '1':
Exemplo n.º 20
0
        unset($pInfo->products_qty_blocks);
        $pInfo->products_qty_blocks[0] = $product['products_qty_blocks'];
        unset($pInfo->products_min_order_qty);
        $pInfo->products_min_order_qty[0] = $product['products_min_order_qty'];
        // price_breaks_array is taken care of by PriceFormatterAdmin.php
        // EOF QPBPP for SPPC
        // BOF indvship 4.5
        $products_shipping_query = tep_db_query("SELECT * FROM " . TABLE_PRODUCTS_SHIPPING . " WHERE products_id=" . (int) $_GET['pID']);
        while ($products_shipping = tep_db_fetch_array($products_shipping_query)) {
            $products_ship_methods_id = $products_shipping['products_ship_methods_id'];
            $products_ship_zip = $products_shipping['products_ship_zip'];
            $products_ship_price = $products_shipping['products_ship_price'];
            $products_ship_price_two = $products_shipping['products_ship_price_two'];
        }
        $shipping = array('products_ship_methods_id' => $products_ship_methods_id, 'products_ship_zip' => $products_ship_zip, 'products_ship_price' => $products_ship_price, 'products_ship_price_two' => $products_ship_price_two);
        $pInfo->objectInfo($shipping);
        // EOF indvship 4.5
    }
    $form_action = isset($_GET['pID']) ? 'update_product' : 'insert_product';
    echo tep_draw_form($form_action, FILENAME_CATEGORIES, 'cPath=' . $cPath . (isset($_GET['pID']) ? '&amp;pID=' . $_GET['pID'] : '') . '&amp;action=' . $form_action, 'post', 'enctype="multipart/form-data"');
    ?>
  <table>
    <tr>
      <td>
	  <!-- // PREVIEW TAB HEADER LOOP START //-->
      <div id="previewtabs">
	    <ul>
	    <?php 
    $languages = tep_get_languages();
    for ($j = 0, $n = sizeof($languages); $j < $n; $j++) {
        ?>
Exemplo n.º 21
0
<!-- left_navigation_eof //-->
    </table></td>
<!-- body_text //-->
    <td width="100%" valign="top">
<?php 
if ($action == 'edit' || $action == 'new') {
    $parameters = array();
    $query = tep_db_query("describe " . TABLE_AUTHORS . "");
    while ($row = tep_db_fetch_array($query)) {
        $parameters[$row['Field']] = '';
    }
    $aInfo = new objectInfo($parameters);
    if (tep_not_null($HTTP_GET_VARS['aID']) && empty($HTTP_POST_VARS)) {
        $author_query = tep_db_query("select * from " . TABLE_AUTHORS . " where authors_id = '" . (int) $HTTP_GET_VARS['aID'] . "' and language_id = '" . (int) $languages_id . "'");
        $author = tep_db_fetch_array($author_query);
        $aInfo->objectInfo($author);
    } elseif (tep_not_null($HTTP_POST_VARS)) {
        $aInfo->objectInfo($HTTP_POST_VARS);
        $authors_name = array_map("stripslashes", $HTTP_POST_VARS['authors_name']);
        $authors_description = array_map("stripslashes", $HTTP_POST_VARS['authors_description']);
    }
    $languages = tep_get_languages();
    $form_action = tep_not_null($HTTP_GET_VARS['aID']) ? 'save' : 'insert';
    echo tep_draw_form('authors', FILENAME_AUTHORS, tep_get_all_get_params(array('aID', 'action')) . (tep_not_null($HTTP_GET_VARS['aID']) ? '&aID=' . $HTTP_GET_VARS['aID'] : '') . '&action=' . $form_action, 'post', 'enctype="multipart/form-data"') . (tep_not_null($HTTP_GET_VARS['aID']) ? tep_draw_hidden_field('authors_id', $aInfo->authors_id) : '');
    ?>
    <table border="0" width="100%" cellspacing="0" cellpadding="2">
      <tr>
        <td class="pageHeading"><?php 
    echo $form_action == 'save' ? sprintf(TEXT_HEADING_EDIT_AUTHOR, $aInfo->authors_name) : TEXT_HEADING_NEW_AUTHOR;
    ?>
</td>
Exemplo n.º 22
0
    if (isset($_GET['bID'])) {
        $form_action = 'update';
        $bID = tep_db_prepare_input($_GET['bID']);
        $page_query = tep_db_query("select\n                                    s.status,\n                                    s.sort_order,\n                                    s.page_type,\n                                    p.pages_title,\n                                    p.pages_html_text,\n                                    p.intorext,\n                                    p.externallink,\n                                    p.link_target,\n                                    p.language_id\n                                  from\n                                    " . TABLE_PAGES . " s left join " . TABLE_PAGES_DESCRIPTION . " p on s.pages_id=p.pages_id\n                                  where\n                                    s.pages_id = '" . (int) $bID . "'");
        while ($page = tep_db_fetch_array($page_query)) {
            $languageid = $page['language_id'];
            $page_type = $page['page_type'];
            $pagetitle[$languageid] = $page['pages_title'];
            $sortorder = $page['sort_order'];
            $pages_html_text[$languageid] = $page['pages_html_text'];
            $intorext[$languageid] = $page['intorext'];
            $externallink[$languageid] = $page['externallink'];
            $link_target[$languageid] = $page['link_target'];
        }
    } elseif (tep_not_null($_POST)) {
        $bInfo->objectInfo($_POST);
    }
    $bIDif = "";
    if (!empty($bID) && $bID != "") {
        $bIDif = '&bID=' . $bID;
    }
    ?>
      <tr>
        <td><?php 
    echo tep_draw_separator('pixel_trans.gif', '1', '10');
    ?>
</td>
      </tr>
      <tr><?php 
    echo tep_draw_form('new_page', FILENAME_PAGE_MANAGER, (isset($_GET['page']) ? 'page=' . $_GET['page'] . '&' : '') . 'action=' . $form_action . $bIDif, 'post', 'enctype="multipart/form-data"');
    if ($form_action == 'update') {
Exemplo n.º 23
0
<!-- left_navigation //-->
<?php 
require DIR_WS_INCLUDES . 'column_left.php';
?>
<!-- left_navigation_eof //-->
    </table></td>
<!-- body_text //-->
    <td width="100%" valign="top">
<?php 
if ($action == 'new_product') {
    $parameters = array('products_name' => '', 'products_description' => '', 'products_url' => '', 'products_id' => '', 'products_quantity' => '', 'products_model' => '', 'products_image' => '', 'products_price' => '', 'products_weight' => '', 'products_date_added' => '', 'products_last_modified' => '', 'products_date_available' => '', 'products_status' => '', 'products_tax_class_id' => '', 'manufacturers_id' => '', 'products_fsk18' => '', 'products_price_class' => '', 'products_ean' => '', 'products_distributor_id' => '');
    $pInfo = new objectInfo($parameters);
    if (isset($HTTP_GET_VARS['pID']) && empty($HTTP_POST_VARS)) {
        $product_query = tep_db_query("select p.products_ean,p.products_distributor_id,pd.short_description,p.products_price_class,pd.products_name, pd.products_description, pd.products_url, p.products_id, p.products_quantity, p.products_model, p.products_image, p.products_price, p.products_weight, p.products_date_added, p.products_last_modified, date_format(p.products_date_available, '%Y-%m-%d') as products_date_available, p.products_status, p.products_tax_class_id, p.manufacturers_id,p.products_fsk18 from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . (int) $HTTP_GET_VARS['pID'] . "' and p.products_id = pd.products_id and pd.language_id = '" . (int) $languages_id . "'");
        $product = tep_db_fetch_array($product_query);
        $pInfo->objectInfo($product);
    } elseif (tep_not_null($HTTP_POST_VARS)) {
        $pInfo->objectInfo($HTTP_POST_VARS);
        $products_name = $HTTP_POST_VARS['products_name'];
        $products_description = $HTTP_POST_VARS['products_description'];
        $short_description = $HTTP_POST_VARS['short_description'];
        $products_url = $HTTP_POST_VARS['products_url'];
    }
    $manufacturers_array = array(array('id' => '', 'text' => TEXT_NONE));
    $manufacturers_query = tep_db_query("select manufacturers_id, manufacturers_name from " . TABLE_MANUFACTURERS . " order by manufacturers_name");
    while ($manufacturers = tep_db_fetch_array($manufacturers_query)) {
        $manufacturers_array[] = array('id' => $manufacturers['manufacturers_id'], 'text' => $manufacturers['manufacturers_name']);
    }
    $tax_class_array = array(array('id' => '0', 'text' => TEXT_NONE));
    $tax_class_query = tep_db_query("select tax_class_id, tax_class_title from " . TABLE_TAX_CLASS . " order by tax_class_title");
    while ($tax_class = tep_db_fetch_array($tax_class_query)) {
Exemplo n.º 24
0
?>
</td>
          </tr>
        </table></td>
      </tr>
<?php 
if ($action == 'new') {
    $form_action = 'insert';
    $parameters = array('expires_date' => '', 'date_scheduled' => '', 'banners_title' => '', 'banners_url' => '', 'banners_group' => '', 'banners_image' => '', 'banners_html_text' => '', 'expires_impressions' => '');
    $bInfo = new objectInfo($parameters);
    if (isset($_GET['bID'])) {
        $form_action = 'update';
        $bID = tep_db_prepare_input($_GET['bID']);
        $banner_query = tep_db_query("select banners_title, banners_url, banners_image, banners_group, banners_html_text, status, date_format(date_scheduled, '%Y/%m/%d') as date_scheduled, date_format(expires_date, '%Y/%m/%d') as expires_date, expires_impressions, date_status_change from " . TABLE_BANNERS . " where banners_id = '" . (int) $bID . "'");
        $banner = tep_db_fetch_array($banner_query);
        $bInfo->objectInfo($banner);
    } elseif (tep_not_null($_POST)) {
        $bInfo->objectInfo($_POST);
    }
    $groups_array = array();
    $groups_query = tep_db_query("select distinct banners_group from " . TABLE_BANNERS . " order by banners_group");
    while ($groups = tep_db_fetch_array($groups_query)) {
        $groups_array[] = array('id' => $groups['banners_group'], 'text' => $groups['banners_group']);
    }
    ?>
      <tr>
        <td><?php 
    echo tep_draw_separator('pixel_trans.gif', '1', '10');
    ?>
</td>
      </tr>
Exemplo n.º 25
0
    echo TEXT_EDITOR_INFO . zen_draw_form('set_editor_form', FILENAME_NEWSLETTERS, '', 'get') . '&nbsp;&nbsp;' . zen_draw_pull_down_menu('reset_editor', $editors_pulldown, $current_editor_key, 'onChange="this.form.submit();"') . zen_hide_session_id() . zen_draw_hidden_field('action', 'set_editor') . '</form>';
}
?>
          </tr>
        </table></td>
      </tr>
<?php 
if ($action == 'new') {
    $form_action = 'insert';
    $parameters = array('title' => '', 'content' => '', 'content_html' => '', 'module' => '');
    $nInfo = new objectInfo($parameters);
    if (isset($_GET['nID'])) {
        $form_action = 'update';
        $nID = zen_db_prepare_input($_GET['nID']);
        $newsletter = $db->Execute("select title, content, content_html, module\n                                  from " . TABLE_NEWSLETTERS . "\n                                  where newsletters_id = '" . (int) $nID . "'");
        $nInfo->objectInfo($newsletter->fields);
    } elseif ($_POST) {
        $nInfo->objectInfo($_POST);
    }
    $file_extension = substr($PHP_SELF, strrpos($PHP_SELF, '.'));
    $directory_array = array();
    if ($dir = dir(DIR_WS_MODULES . 'newsletters/')) {
        while ($file = $dir->read()) {
            if (!is_dir(DIR_WS_MODULES . 'newsletters/' . $file)) {
                if (substr($file, strrpos($file, '.')) == $file_extension) {
                    $directory_array[] = $file;
                }
            }
        }
        sort($directory_array);
        $dir->close();
Exemplo n.º 26
0
 $tInfo->blocks = array();
 $tInfo->blocks_types = array();
 if (isset($HTTP_GET_VARS['tID']) && empty($HTTP_POST_VARS)) {
     $template_query = tep_db_query("select * from " . TABLE_TEMPLATES . " where templates_id = '" . (int) $HTTP_GET_VARS['tID'] . "' and language_id = '" . (int) $languages_id . "'");
     $template = tep_db_fetch_array($template_query);
     $template['blocks'] = array();
     $blocks_query = tep_db_query("select blocks_id from " . TABLE_TEMPLATES_TO_BLOCKS . " where templates_id = '" . (int) $HTTP_GET_VARS['tID'] . "'");
     while ($blocks = tep_db_fetch_array($blocks_query)) {
         $template['blocks'][] = $blocks['blocks_id'];
     }
     $template['blocks_types'] = array();
     $types_query = tep_db_query("select blocks_types_id from " . TABLE_TEMPLATES_TO_BLOCKS_TYPES . " where templates_id = '" . (int) $HTTP_GET_VARS['tID'] . "'");
     while ($types = tep_db_fetch_array($types_query)) {
         $template['blocks_types'][] = $types['blocks_types_id'];
     }
     $tInfo->objectInfo($template);
 } elseif (tep_not_null($HTTP_POST_VARS)) {
     $tInfo->objectInfo($HTTP_POST_VARS);
     $templates_name = array_map("stripslashes", $HTTP_POST_VARS['templates_name']);
     $templates_description = array_map("stripslashes", $HTTP_POST_VARS['templates_description']);
 }
 if (!is_array($tInfo->templates)) {
     $tInfo->templates = array();
 }
 $languages = tep_get_languages();
 $form_action = isset($HTTP_GET_VARS['tID']) ? 'update' : 'insert';
 echo tep_draw_form('templates', FILENAME_TEMPLATES, 'action=' . $form_action . (isset($HTTP_GET_VARS['tID']) ? '&tID=' . $HTTP_GET_VARS['tID'] : ''), 'post', 'enctype="multipart/form-data"');
 ?>
 <table border="0" width="100%" cellspacing="0" cellpadding="2">
   <tr>
     <td class="pageHeading"><?php 
Exemplo n.º 27
0
?>
</td>
          </tr>
        </table></td>
      </tr>
<?php 
if ($action == 'new') {
    $form_action = 'insert';
    $parameters = array('title' => '', 'content' => '', 'module' => '', 'filter' => '');
    $nInfo = new objectInfo($parameters);
    if (isset($HTTP_GET_VARS['nID'])) {
        $form_action = 'update';
        $nID = tep_db_prepare_input($HTTP_GET_VARS['nID']);
        $newsletter_query = tep_db_query("select title, content, module, filter from " . TABLE_NEWSLETTERS . " where newsletters_id = '" . (int) $nID . "'");
        $newsletter = tep_db_fetch_array($newsletter_query);
        $nInfo->objectInfo($newsletter);
    } elseif ($HTTP_POST_VARS) {
        $nInfo->objectInfo($HTTP_POST_VARS);
    }
    $file_extension = substr($PHP_SELF, strrpos($PHP_SELF, '.'));
    $directory_array = array();
    if ($dir = dir(DIR_WS_MODULES . 'newsletters/')) {
        while ($file = $dir->read()) {
            if (!is_dir(DIR_WS_MODULES . 'newsletters/' . $file)) {
                if (substr($file, strrpos($file, '.')) == $file_extension) {
                    $directory_array[] = $file;
                }
            }
        }
        sort($directory_array);
        $dir->close();
Exemplo n.º 28
0
// check if the catalog image directory exists
if (is_dir(DIR_FS_CATALOG_IMAGES)) {
    if (!tep_is_writable(DIR_FS_CATALOG_IMAGES)) {
        $messageStack->add(ERROR_CATALOG_IMAGE_DIRECTORY_NOT_WRITEABLE, 'error');
    }
} else {
    $messageStack->add(ERROR_CATALOG_IMAGE_DIRECTORY_DOES_NOT_EXIST, 'error');
}
require DIR_WS_INCLUDES . 'template_top.php';
if ($action == 'new_product') {
    $parameters = array('products_name' => '', 'products_description' => '', 'products_url' => '', 'products_id' => '', 'products_quantity' => '', 'products_model' => '', 'products_image' => '', 'products_larger_images' => array(), 'products_price' => '', 'products_weight' => '', 'products_date_added' => '', 'products_last_modified' => '', 'products_date_available' => '', 'products_status' => '', 'products_tax_class_id' => '', 'manufacturers_id' => '');
    $pInfo = new objectInfo($parameters);
    if (isset($HTTP_GET_VARS['pID']) && empty($HTTP_POST_VARS)) {
        $product_query = tep_db_query("select pd.products_name, pd.products_description, pd.products_url, p.products_id, p.products_quantity, p.products_model, p.products_image, p.products_price, p.products_weight, p.products_date_added, p.products_last_modified, date_format(p.products_date_available, '%Y-%m-%d') as products_date_available, p.products_status, p.products_tax_class_id, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . (int) $HTTP_GET_VARS['pID'] . "' and p.products_id = pd.products_id and pd.language_id = '" . (int) $languages_id . "'");
        $product = tep_db_fetch_array($product_query);
        $pInfo->objectInfo($product);
        $product_images_query = tep_db_query("select id, image, htmlcontent, sort_order from " . TABLE_PRODUCTS_IMAGES . " where products_id = '" . (int) $product['products_id'] . "' order by sort_order");
        while ($product_images = tep_db_fetch_array($product_images_query)) {
            $pInfo->products_larger_images[] = array('id' => $product_images['id'], 'image' => $product_images['image'], 'htmlcontent' => $product_images['htmlcontent'], 'sort_order' => $product_images['sort_order']);
        }
    }
    $manufacturers_array = array(array('id' => '', 'text' => TEXT_NONE));
    $manufacturers_query = tep_db_query("select manufacturers_id, manufacturers_name from " . TABLE_MANUFACTURERS . " order by manufacturers_name");
    while ($manufacturers = tep_db_fetch_array($manufacturers_query)) {
        $manufacturers_array[] = array('id' => $manufacturers['manufacturers_id'], 'text' => $manufacturers['manufacturers_name']);
    }
    $tax_class_array = array(array('id' => '0', 'text' => TEXT_NONE));
    $tax_class_query = tep_db_query("select tax_class_id, tax_class_title from " . TABLE_TAX_CLASS . " order by tax_class_title");
    while ($tax_class = tep_db_fetch_array($tax_class_query)) {
        $tax_class_array[] = array('id' => $tax_class['tax_class_id'], 'text' => $tax_class['tax_class_title']);
    }
Exemplo n.º 29
0
              <td class="pageHeading" align="right">&nbsp;</td>
            </tr>
          </table>
        </td>
      </tr>
<?php 
if ($action == 'new') {
    $form_action = 'insert';
    $parameters = array('title' => '', 'content' => '', 'module' => '');
    $nInfo = new objectInfo($parameters);
    if (isset($_GET['nID'])) {
        $form_action = 'update';
        $nID = tep_db_prepare_input($_GET['nID']);
        $affiliate_newsletter_query = tep_db_query("select title, content, module from " . TABLE_AFFILIATE_NEWSLETTERS . " where affiliate_newsletters_id = '" . (int) $nID . "'");
        $affiliate_newsletter = tep_db_fetch_array($affiliate_newsletter_query);
        $nInfo->objectInfo($affiliate_newsletter);
    } elseif ($_POST) {
        $nInfo->objectInfo($_POST);
    }
    $file_extension = substr($PHP_SELF, strrpos($PHP_SELF, '.'));
    $directory_array = array();
    if ($dir = dir(DIR_WS_MODULES . 'newsletters/')) {
        while ($file = $dir->read()) {
            if (!is_dir(DIR_WS_MODULES . 'newsletters/' . $file)) {
                if (substr($file, strrpos($file, '.')) == $file_extension) {
                    $directory_array[] = $file;
                }
            }
        }
        sort($directory_array);
        $dir->close();
Exemplo n.º 30
0
     } else {
         $seog_array = $g_db->fetch_array($seog_query);
     }
     $generic_text = array_merge($generic_text, $seog_array);
     //-MS- SEO-G Added EOM
     //-MS- META-G Added
     $metag_query = $g_db->query("select meta_title, meta_keywords, meta_text from " . TABLE_META_GTEXT . " where gtext_id = '" . (int) $gtID . "'");
     if (!$g_db->num_rows($metag_query)) {
         $metag_array = array('meta_title' => '', 'meta_keywords' => '', 'meta_text' => '');
     } else {
         $metag_array = $g_db->fetch_array($metag_query);
     }
     $generic_text = array_merge($generic_text, $metag_array);
     //-MS- META-G Added EOM
     $generic_text['gtext_description'] .= $template_content;
     $gtInfo->objectInfo($generic_text, false);
     // Navigation History
     $g_plugins->invoke('add_current_page', $gtInfo->gtext_title, tep_get_all_get_params());
 }
 if (empty($gtInfo->status)) {
     $gtInfo->status = '1';
 }
 switch ($gtInfo->status) {
     case '0':
         $in_status = false;
         $out_status = true;
         break;
     case '1':
     default:
         $in_status = true;
         $out_status = false;