function choose_audience()
    {
        global $_GET, $languages_id, $store_id;
        $products_array = array();
        $products_query = smn_db_query("select pd.products_id, pd.products_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.store_id = '" . $store_id . "' and pd.language_id = '" . $languages_id . "' and pd.products_id = p.products_id and p.products_status = '1' order by pd.products_name");
        while ($products = smn_db_fetch_array($products_query)) {
            $products_array[] = array('id' => $products['products_id'], 'text' => $products['products_name']);
        }
        $choose_audience_string = '<script language="javascript"><!--
function mover(move) {
  if (move == \'remove\') {
    for (x=0; x<(document.notifications.products.length); x++) {
      if (document.notifications.products.options[x].selected) {
        with(document.notifications.elements[\'chosen[]\']) {
          options[options.length] = new Option(document.notifications.products.options[x].text,document.notifications.products.options[x].value);
        }
        document.notifications.products.options[x] = null;
        x = -1;
      }
    }
  }
  if (move == \'add\') {
    for (x=0; x<(document.notifications.elements[\'chosen[]\'].length); x++) {
      if (document.notifications.elements[\'chosen[]\'].options[x].selected) {
        with(document.notifications.products) {
          options[options.length] = new Option(document.notifications.elements[\'chosen[]\'].options[x].text,document.notifications.elements[\'chosen[]\'].options[x].value);
        }
        document.notifications.elements[\'chosen[]\'].options[x] = null;
        x = -1;
      }
    }
  }
  return true;
}

function selectAll(FormName, SelectBox) {
  temp = "document." + FormName + ".elements[\'" + SelectBox + "\']";
  Source = eval(temp);

  for (x=0; x<(Source.length); x++) {
    Source.options[x].selected = "true";
  }

  if (x<1) {
    alert(\'' . JS_PLEASE_SELECT_PRODUCTS . '\');
    return false;
  } else {
    return true;
  }
}
//--></script>';
        $global_button = '<script language="javascript"><!--' . "\n" . 'document.write(\'<input type="button" value="' . BUTTON_GLOBAL . '" style="width: 8em;" onclick="document.location=\\\'' . smn_href_link(FILENAME_NEWSLETTERS, 'page=' . $_GET['page'] . '&nID=' . $_GET['nID'] . '&action=confirm&global=true') . '\\\'">\');' . "\n" . '//--></script><noscript><a href="' . smn_href_link(FILENAME_NEWSLETTERS, 'page=' . $_GET['page'] . '&nID=' . $_GET['nID'] . '&action=confirm&global=true') . '">[ ' . BUTTON_GLOBAL . ' ]</a></noscript>';
        $cancel_button = '<script language="javascript"><!--' . "\n" . 'document.write(\'<input type="button" value="' . BUTTON_CANCEL . '" style="width: 8em;" onclick="document.location=\\\'' . smn_href_link(FILENAME_NEWSLETTERS, 'page=' . $_GET['page'] . '&nID=' . $_GET['nID']) . '\\\'">\');' . "\n" . '//--></script><noscript><a href="' . smn_href_link(FILENAME_NEWSLETTERS, 'page=' . $_GET['page'] . '&nID=' . $_GET['nID']) . '">[ ' . BUTTON_CANCEL . ' ]</a></noscript>';
        $choose_audience_string .= '<form name="notifications" action="' . smn_href_link(FILENAME_NEWSLETTERS, 'page=' . $_GET['page'] . '&nID=' . $_GET['nID'] . '&action=confirm') . '" method="post" onSubmit="return selectAll(\'notifications\', \'chosen[]\')"><table border="0" width="100%" cellspacing="0" cellpadding="2">' . "\n" . '  <tr>' . "\n" . '    <td align="center" class="main"><b>' . TEXT_PRODUCTS . '</b><br>' . smn_draw_pull_down_menu('products', $products_array, '', 'size="20" style="width: 20em;" multiple') . '</td>' . "\n" . '    <td align="center" class="main">&nbsp;<br>' . $global_button . '<br><br><br><input type="button" value="' . BUTTON_SELECT . '" style="width: 8em;" onClick="mover(\'remove\');"><br><br><input type="button" value="' . BUTTON_UNSELECT . '" style="width: 8em;" onClick="mover(\'add\');"><br><br><br><input type="submit" value="' . BUTTON_SUBMIT . '" style="width: 8em;"><br><br>' . $cancel_button . '</td>' . "\n" . '    <td align="center" class="main"><b>' . TEXT_SELECTED_PRODUCTS . '</b><br>' . smn_draw_pull_down_menu('chosen[]', array(), '', 'size="20" style="width: 20em;" multiple') . '</td>' . "\n" . '  </tr>' . "\n" . '</table></form>';
        return $choose_audience_string;
    }
Пример #2
0
 function selection()
 {
     global $order;
     for ($i = 1; $i < 13; $i++) {
         $expires_month[] = array('id' => sprintf('%02d', $i), 'text' => strftime('%B', mktime(0, 0, 0, $i, 1, 2000)));
     }
     $today = getdate();
     for ($i = $today['year']; $i < $today['year'] + 10; $i++) {
         $expires_year[] = array('id' => strftime('%y', mktime(0, 0, 0, 1, 1, $i)), 'text' => strftime('%Y', mktime(0, 0, 0, 1, 1, $i)));
     }
     $selection = array('id' => $this->code, 'module' => $this->title, 'fields' => array(array('title' => MODULE_PAYMENT_IPAYMENT_TEXT_CREDIT_CARD_OWNER, 'field' => smn_draw_input_field('ipayment_cc_owner', $order->billing['firstname'] . ' ' . $order->billing['lastname'])), array('title' => MODULE_PAYMENT_IPAYMENT_TEXT_CREDIT_CARD_NUMBER, 'field' => smn_draw_input_field('ipayment_cc_number')), array('title' => MODULE_PAYMENT_IPAYMENT_TEXT_CREDIT_CARD_EXPIRES, 'field' => smn_draw_pull_down_menu('ipayment_cc_expires_month', $expires_month) . '&nbsp;' . smn_draw_pull_down_menu('ipayment_cc_expires_year', $expires_year)), array('title' => MODULE_PAYMENT_IPAYMENT_TEXT_CREDIT_CARD_CHECKNUMBER, 'field' => smn_draw_input_field('ipayment_cc_checkcode', '', 'size="4" maxlength="3"') . '&nbsp;<small>' . MODULE_PAYMENT_IPAYMENT_TEXT_CREDIT_CARD_CHECKNUMBER_LOCATION . '</small>')));
     return $selection;
 }
Пример #3
0
 function selection()
 {
     global $order;
     // -- Generates an array containing the text names of each month of the year.
     for ($i = 1; $i < 13; $i++) {
         $expires_month[] = array('id' => sprintf('%02d', $i), 'text' => strftime('%B', mktime(0, 0, 0, $i, 1, 2000)));
     }
     // -- Generates an array containing this year and the next nine years.
     $today = getdate();
     for ($i = $today['year']; $i < $today['year'] + 10; $i++) {
         $expires_year[] = array('id' => strftime('%y', mktime(0, 0, 0, 1, 1, $i)), 'text' => strftime('%Y', mktime(0, 0, 0, 1, 1, $i)));
     }
     $selection = array('id' => $this->code, 'module' => $this->title, 'fields' => array(array('title' => MODULE_PAYMENT_SUREPAY_TEXT_CREDIT_CARD_NUMBER, 'field' => smn_draw_input_field('surepay_cc_number')), array('title' => MODULE_PAYMENT_SUREPAY_TEXT_CREDIT_CARD_CVV2, 'field' => smn_draw_input_field('surepay_cc_cvv2')), array('title' => MODULE_PAYMENT_SUREPAY_TEXT_CREDIT_CARD_EXPIRES, 'field' => smn_draw_pull_down_menu('surepay_cc_expires_month', $expires_month) . '&nbsp;' . smn_draw_pull_down_menu('surepay_cc_expires_year', $expires_year))));
     return $selection;
 }
Пример #4
0
 function selection()
 {
     global $order;
     if (MODULE_PAYMENT_PSIGATE_INPUT_MODE == 'Local') {
         for ($i = 1; $i < 13; $i++) {
             $expires_month[] = array('id' => sprintf('%02d', $i), 'text' => strftime('%B', mktime(0, 0, 0, $i, 1, 2000)));
         }
         $today = getdate();
         for ($i = $today['year']; $i < $today['year'] + 10; $i++) {
             $expires_year[] = array('id' => strftime('%y', mktime(0, 0, 0, 1, 1, $i)), 'text' => strftime('%Y', mktime(0, 0, 0, 1, 1, $i)));
         }
         $selection = array('id' => $this->code, 'module' => $this->title, 'fields' => array(array('title' => MODULE_PAYMENT_PSIGATE_TEXT_CREDIT_CARD_OWNER, 'field' => $order->billing['firstname'] . ' ' . $order->billing['lastname']), array('title' => MODULE_PAYMENT_PSIGATE_TEXT_CREDIT_CARD_NUMBER, 'field' => smn_draw_input_field('psigate_cc_number')), array('title' => MODULE_PAYMENT_PSIGATE_TEXT_CREDIT_CARD_EXPIRES, 'field' => smn_draw_pull_down_menu('psigate_cc_expires_month', $expires_month) . '&nbsp;' . smn_draw_pull_down_menu('psigate_cc_expires_year', $expires_year))));
     } else {
         $selection = array('id' => $this->code, 'module' => $this->title);
     }
     return $selection;
 }
 function display_links($query_numrows, $max_rows_per_page, $max_page_links, $current_page_number, $parameters = '', $page_name = 'page')
 {
     global $PHP_SELF;
     if (smn_not_null($parameters) && substr($parameters, -1) != '&') {
         $parameters .= '&';
     }
     // calculate number of pages needing links
     $num_pages = ceil($query_numrows / $max_rows_per_page);
     $pages_array = array();
     for ($i = 1; $i <= $num_pages; $i++) {
         $pages_array[] = array('id' => $i, 'text' => $i);
     }
     if ($num_pages > 1) {
         $display_links = smn_draw_form('pages', basename($PHP_SELF), '', 'get');
         if ($current_page_number > 1) {
             $display_links .= '<a href="' . smn_href_link(basename($PHP_SELF), $parameters . $page_name . '=' . ($current_page_number - 1), 'NONSSL') . '" class="splitPageLink">' . PREVNEXT_BUTTON_PREV . '</a>&nbsp;&nbsp;';
         } else {
             $display_links .= PREVNEXT_BUTTON_PREV . '&nbsp;&nbsp;';
         }
         $display_links .= sprintf(TEXT_RESULT_PAGE, smn_draw_pull_down_menu($page_name, $pages_array, $current_page_number, 'onChange="this.form.submit();"'), $num_pages);
         if ($current_page_number < $num_pages && $num_pages != 1) {
             $display_links .= '&nbsp;&nbsp;<a href="' . smn_href_link(basename($PHP_SELF), $parameters . $page_name . '=' . ($current_page_number + 1), 'NONSSL') . '" class="splitPageLink">' . PREVNEXT_BUTTON_NEXT . '</a>';
         } else {
             $display_links .= '&nbsp;&nbsp;' . PREVNEXT_BUTTON_NEXT;
         }
         if ($parameters != '') {
             if (substr($parameters, -1) == '&') {
                 $parameters = substr($parameters, 0, -1);
             }
             $pairs = explode('&', $parameters);
             while (list(, $pair) = each($pairs)) {
                 list($key, $value) = explode('=', $pair);
                 $display_links .= smn_draw_hidden_field(rawurldecode($key), rawurldecode($value));
             }
         }
         $display_links .= smn_hide_session_id() . '</form>';
     } else {
         $display_links = sprintf(TEXT_RESULT_PAGE, $num_pages, $num_pages);
     }
     return $display_links;
 }
  
  This source file is subject to version 2.0 of the GPL license,   
  that is bundled with this package in the file LICENSE. If you
  did not receive a copy of the oscMall System license and are unable 
  to obtain it through the world-wide-web, please send a note to    
  license@systemsmanager.net so we can mail you a copy immediately.
*/
global $page_name;
if (isset($_GET['action']) && $_GET['action'] == 'getZones') {
    $Qzones = smn_db_query('select zone_name from ' . TABLE_ZONES . ' where zone_country_id = "' . smn_db_input($_GET['country_id']) . '"');
    if (smn_db_num_rows($Qzones)) {
        $zones_array = array();
        while ($zones = smn_db_fetch_array($Qzones)) {
            $zones_array[] = array('id' => $zones['zone_name'], 'text' => $zones['zone_name']);
        }
        echo smn_draw_pull_down_menu('state', $zones_array);
    } else {
        echo smn_draw_input_field('state');
    }
    echo smn_not_null(ENTRY_STATE_TEXT) ? '&nbsp;<span class="inputRequirement">' . ENTRY_STATE_TEXT . '</span>' : '';
    exit;
}
if ($_POST['conditions'] != 1) {
    smn_redirect(smn_href_link(FILENAME_CREATE_STORE, '', 'NONSSL'));
}
if (!isset($_POST['store_type'])) {
    smn_redirect(smn_href_link(FILENAME_CREATE_STORE, '', 'NONSSL'));
} else {
    $new_store_type = (int) $_POST['store_type'];
}
if (isset($_POST['action']) && $_POST['action'] == 'process') {
Пример #7
0
     if ($_GET['error']) {
         $contents[] = array('text' => TEXT_INFO_ERROR);
     }
     $contents[] = array('text' => smn_draw_hidden_field('admin_id', $mInfo->admin_id));
     $contents[] = array('text' => '<br>&nbsp;' . TEXT_INFO_FIRSTNAME . '<br>&nbsp;' . smn_draw_input_field('admin_firstname', $mInfo->admin_firstname));
     $contents[] = array('text' => '<br>&nbsp;' . TEXT_INFO_LASTNAME . '<br>&nbsp;' . smn_draw_input_field('admin_lastname', $mInfo->admin_lastname));
     $contents[] = array('text' => '<br>&nbsp;' . TEXT_INFO_EMAIL . '<br>&nbsp;' . smn_draw_input_field('admin_email_address', $mInfo->admin_email_address));
     if ($mInfo->admin_id == 1) {
         $contents[] = array('text' => smn_draw_hidden_field('admin_groups_id', $mInfo->admin_groups_id));
     } else {
         $groups_array = array(array('id' => '0', 'text' => TEXT_NONE));
         $groups_query = smn_db_query("select admin_groups_id, admin_groups_name from " . TABLE_ADMIN_GROUPS);
         while ($groups = smn_db_fetch_array($groups_query)) {
             $groups_array[] = array('id' => $groups['admin_groups_id'], 'text' => $groups['admin_groups_name']);
         }
         $contents[] = array('text' => '<br>&nbsp;' . TEXT_INFO_GROUP . '<br>&nbsp;' . smn_draw_pull_down_menu('admin_groups_id', $groups_array, $mInfo->admin_groups_id));
     }
     $contents[] = array('align' => 'center', 'text' => '<br>' . smn_image_submit('button_insert.gif', IMAGE_INSERT, 'onClick="validateForm();return document.returnValue"') . ' <a href="' . smn_href_link(FILENAME_ADMIN_MEMBERS, 'page=' . $_GET['page'] . '&mID=' . $_GET['mID']) . '">' . smn_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>');
     break;
 case 'del_member':
     $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_DELETE . '</b>');
     if ($mInfo->admin_id == 1 || $mInfo->admin_email_address == STORE_OWNER_EMAIL_ADDRESS) {
         $contents[] = array('align' => 'center', 'text' => '<br><a href="' . smn_href_link(FILENAME_ADMIN_MEMBERS, 'page=' . $_GET['page'] . '&mID=' . $mInfo->admin_id) . '">' . smn_image_button('button_back.gif', IMAGE_BACK) . '</a><br>&nbsp;');
     } else {
         $contents = array('form' => smn_draw_form('edit', FILENAME_ADMIN_MEMBERS, 'action=member_delete&page=' . $page . '&mID=' . $admin['admin_id'], 'post', 'enctype="multipart/form-data"'));
         $contents[] = array('text' => smn_draw_hidden_field('admin_id', $mInfo->admin_id));
         $contents[] = array('align' => 'center', 'text' => sprintf(TEXT_INFO_DELETE_INTRO, $mInfo->admin_firstname . ' ' . $mInfo->admin_lastname));
         $contents[] = array('align' => 'center', 'text' => '<br>' . smn_image_submit('button_delete.gif', IMAGE_DELETE) . ' <a href="' . smn_href_link(FILENAME_ADMIN_MEMBERS, 'page=' . $_GET['page'] . '&mID=' . $_GET['mID']) . '">' . smn_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>');
     }
     break;
 case 'new_group':
Пример #8
0
</td>
                  </tr>
<?php 
}
?>
                </table></td>
              </tr>
            </table></td>
<?php 
$heading = array();
$contents = array();
switch ($action) {
    case 'new':
        $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_NEW_LANGUAGE . '</b>');
        $contents = array('form' => smn_draw_form('languages', FILENAME_LANGUAGES, 'action=insert'));
        $contents[] = array('text' => smn_draw_pull_down_menu('new_language_id', smn_language_list()));
        $contents[] = array('text' => '<br>' . smn_draw_checkbox_field('default') . ' ' . TEXT_SET_DEFAULT);
        $contents[] = array('align' => 'center', 'text' => '<br>' . smn_image_submit('button_insert.gif', IMAGE_INSERT) . ' <a href="' . smn_href_link(FILENAME_LANGUAGES, 'page=' . $_GET['page'] . '&lID=' . $_GET['lID']) . '">' . smn_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>');
        break;
    case 'edit':
        $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_EDIT_LANGUAGE . '</b>');
        $contents = array('form' => smn_draw_form('languages', FILENAME_LANGUAGES, 'page=' . $_GET['page'] . '&lID=' . $lInfo->languages_id . '&action=save'));
        $contents[] = array('text' => TEXT_INFO_EDIT_INTRO);
        $contents[] = array('text' => '<br>' . TEXT_INFO_LANGUAGE_NAME . '<br>' . smn_draw_input_field('name', $lInfo->name));
        $contents[] = array('text' => '<br>' . TEXT_INFO_LANGUAGE_CODE . '<br>' . smn_draw_input_field('code', $lInfo->code));
        $contents[] = array('text' => '<br>' . TEXT_INFO_LANGUAGE_IMAGE . '<br>' . smn_draw_input_field('image', $lInfo->image));
        $contents[] = array('text' => '<br>' . TEXT_INFO_LANGUAGE_DIRECTORY . '<br>' . smn_draw_input_field('directory', $lInfo->directory));
        $contents[] = array('text' => '<br>' . TEXT_INFO_LANGUAGE_SORT_ORDER . '<br>' . smn_draw_input_field('sort_order', $lInfo->sort_order));
        if (DEFAULT_LANGUAGE != $lInfo->code) {
            $contents[] = array('text' => '<br>' . smn_draw_checkbox_field('default') . ' ' . TEXT_SET_DEFAULT);
        }
Пример #9
0
<?php 
}
?>
  <tr>
   <td colspan="2"><?php 
echo smn_draw_separator('pixel_trans.gif', '1', '10');
?>
</td>
  </tr>
  <tr>
   <td class="main"><?php 
echo TEXT_PRODUCTS_MANUFACTURER;
?>
</td>
   <td><?php 
echo smn_draw_separator('pixel_trans.gif', '24', '15') . '&nbsp;' . smn_draw_pull_down_menu('manufacturers_id', $manufacturers_array, $pInfo->manufacturers_id);
?>
</td>
  </tr>
  <tr>
   <td class="main"><?php 
echo TEXT_PRODUCTS_WEIGHT;
?>
</td>
   <td><?php 
echo smn_draw_separator('pixel_trans.gif', '24', '15') . '&nbsp;' . smn_draw_input_field('products_weight', $pInfo->products_weight);
?>
</td>
  </tr>
  <tr>
   <td colspan="2"><?php 
Пример #10
0
</td>
           </tr>
        </table></td>
      </tr>
           <tr>
            <td class="main" align="right"><?php 
        echo smn_draw_form('status', FILENAME_COUPON_ADMIN, '', 'get');
        $status_array[] = array('id' => 'Y', 'text' => TEXT_COUPON_ACTIVE);
        $status_array[] = array('id' => 'N', 'text' => TEXT_COUPON_INACTIVE);
        $status_array[] = array('id' => '*', 'text' => TEXT_COUPON_ALL);
        if ($_GET['status']) {
            $status = smn_db_prepare_input($_GET['status']);
        } else {
            $status = 'Y';
        }
        echo HEADING_TITLE_STATUS . ' ' . smn_draw_pull_down_menu('status', $status_array, $status, 'onChange="this.form.submit();"');
        ?>
              </form>
           </td>
          </tr>
      <tr>
        <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
          <tr>
            <td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
              <tr class="dataTableHeadingRow">
                <td class="dataTableHeadingContent"><?php 
        echo COUPON_NAME;
        ?>
</td>
                <td class="dataTableHeadingContent" align="center"><?php 
        echo COUPON_AMOUNT;
Пример #11
0
?>
                    </td>
                  </tr>
                </table></td>
                <td width="460"><table border="0" width="460" height="390" cellspacing="0" cellpadding="2">
                  <tr>
                    <td colspan="2"><table border="0" width="100%" cellspacing="0" cellpadding="2">
                      <tr><?php 
echo smn_draw_form('languages', 'index.php', '', 'get');
?>
                        <td class="heading"><?php 
echo HEADING_TITLE;
?>
</td>
                        <td align="right"><?php 
echo smn_draw_pull_down_menu('language', $languages_array, $languages_selected, 'onChange="this.form.submit();"');
?>
</td>
                      <?php 
echo smn_hide_session_id();
?>
</form></tr>
                    </table></td>
                  </tr>
<?php 
$col = 2;
$counter = 0;
for ($i = 0, $n = sizeof($cat); $i < $n; $i++) {
    if ($cat[$i]['access'] == true) {
        $counter++;
        if ($counter < $col) {
Пример #12
0
    ?>
</td>
                <td class="main">
				<?php 
    $state = smn_get_zone_name($country, $zone_id, $state);
    if ($is_read_only) {
        echo smn_get_zone_name($account['entry_country_id'], $account['entry_zone_id'], $account['entry_state']);
    } elseif ($error) {
        if ($entry_state_error) {
            if ($entry_state_has_zones) {
                $zones_array = array();
                $zones_query = smn_db_query("select zone_name from " . TABLE_ZONES . " where zone_country_id = '" . smn_db_input($country) . "' order by zone_name");
                while ($zones_values = smn_db_fetch_array($zones_query)) {
                    $zones_array[] = array('id' => $zones_values['zone_name'], 'text' => $zones_values['zone_name']);
                }
                echo smn_draw_pull_down_menu('state', $zones_array) . '&nbsp;' . ENTRY_STATE_ERROR;
            } else {
                echo smn_draw_input_field('state') . '&nbsp;' . ENTRY_STATE_ERROR;
            }
        } else {
            echo $state . smn_draw_hidden_field('zone_id') . smn_draw_hidden_field('state');
        }
    } else {
        echo smn_draw_input_field('state', smn_get_zone_name($account['entry_country_id'], $account['entry_zone_id'], $account['entry_state'])) . '&nbsp;' . '<span class="inputRequirement">' . ENTRY_STATE_TEXT . '</span>';
    }
    ?>
                </td>
              </tr>
<?php 
}
?>
Пример #13
0
function smn_cfg_pull_down_tax_classes($tax_class_id, $key = '')
{
    global $store_id;
    $name = $key ? 'configuration[' . $key . ']' : 'configuration_value';
    $tax_class_array = array(array('id' => '0', 'text' => TEXT_NONE));
    $tax_class_query = smn_db_query("select tax_class_id, tax_class_title from " . TABLE_TAX_CLASS . "  where store_id = '" . $store_id . "'order by tax_class_title");
    while ($tax_class = smn_db_fetch_array($tax_class_query)) {
        $tax_class_array[] = array('id' => $tax_class['tax_class_id'], 'text' => $tax_class['tax_class_title']);
    }
    return smn_draw_pull_down_menu($name, $tax_class_array, $tax_class_id);
}
Пример #14
0
         var $gridClass = $siteTextGrid.data('gridObj');
         $gridClass.showLoading();
         $.ajax({
             url: '<?php 
echo $jQuery->link(basename($_SERVER['PHP_SELF']), 'action=siteTextListing');
?>
&pageName=' + this.value,
             dataType: 'json',
             success: function (data){
                 if (data.success == true){
                     $('tbody[id!="loading"]', $grid).empty();
                     jQuery.each(data.arr, function (){
                         $gridClass.addRow(this);
                     });
                     $grid.focus();
                     $grid.trigger('update');
                     $gridClass.pagerObj.onGridContentUpdate();
                     $gridClass.removeLoading();
                 }else{
                     $.ajax_unsuccessful_message_box(data);
                 }
             }
         });
     });
 });
</script>
<?php 
echo '<div>' . $siteText->getText('text_info_select_page') . ' ' . smn_draw_pull_down_menu('load_page', $pagesArray, '', 'id="load_page"') . '&nbsp;&nbsp;' . $pageNameDeleteButton->output() . '<br><br></div>';
echo $siteTextGrid->outputHTML();
echo $siteTextEditWindow->output();
echo $siteTextDeleteWindow->output();
Пример #15
0
     $contents[] = array('align' => 'center', 'text' => '<br>' . smn_image_submit('button_delete.gif', IMAGE_DELETE) . ' <a href="' . smn_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $pInfo->products_id) . '">' . smn_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>');
     break;
 case 'move_product':
     $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_MOVE_PRODUCT . '</b>');
     $contents = array('form' => smn_draw_form('products', FILENAME_CATEGORIES, 'action=move_product_confirm&cPath=' . $cPath) . smn_draw_hidden_field('products_id', $pInfo->products_id));
     $contents[] = array('text' => sprintf(TEXT_MOVE_PRODUCTS_INTRO, $pInfo->products_name));
     $contents[] = array('text' => '<br>' . TEXT_INFO_CURRENT_CATEGORIES . '<br><b>' . smn_output_generated_category_path($pInfo->products_id, 'product') . '</b>');
     $contents[] = array('text' => '<br>' . sprintf(TEXT_MOVE, $pInfo->products_name) . '<br>' . smn_draw_pull_down_menu('move_to_category_id', smn_get_category_tree(), $current_category_id));
     $contents[] = array('align' => 'center', 'text' => '<br>' . smn_image_submit('button_move.gif', IMAGE_MOVE) . ' <a href="' . smn_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $pInfo->products_id) . '">' . smn_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>');
     break;
 case 'copy_to':
     $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_COPY_TO . '</b>');
     $contents = array('form' => smn_draw_form('copy_to', FILENAME_CATEGORIES, 'action=copy_to_confirm&cPath=' . $cPath) . smn_draw_hidden_field('products_id', $pInfo->products_id));
     $contents[] = array('text' => TEXT_INFO_COPY_TO_INTRO);
     $contents[] = array('text' => '<br>' . TEXT_INFO_CURRENT_CATEGORIES . '<br><b>' . smn_output_generated_category_path($pInfo->products_id, 'product') . '</b>');
     $contents[] = array('text' => '<br>' . TEXT_CATEGORIES . '<br>' . smn_draw_pull_down_menu('categories_id', smn_get_category_tree(), $current_category_id));
     $contents[] = array('text' => '<br>' . TEXT_HOW_TO_COPY . '<br>' . smn_draw_radio_field('copy_as', 'link', true) . ' ' . TEXT_COPY_AS_LINK . '<br>' . smn_draw_radio_field('copy_as', 'duplicate') . ' ' . TEXT_COPY_AS_DUPLICATE);
     $contents[] = array('align' => 'center', 'text' => '<br>' . smn_image_submit('button_copy.gif', IMAGE_COPY) . ' <a href="' . smn_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $pInfo->products_id) . '">' . smn_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>');
     break;
 default:
     if ($rows > 0) {
         if (isset($cInfo) && is_object($cInfo)) {
             // category info box contents
             $category_path_string = '';
             $category_path = smn_generate_category_path($cInfo->categories_id);
             for ($i = sizeof($category_path[0]) - 1; $i > 0; $i--) {
                 $category_path_string .= $category_path[0][$i]['id'] . '_';
             }
             $category_path_string = substr($category_path_string, 0, -1);
             $heading[] = array('text' => '<b>' . $cInfo->categories_name . '</b>');
             $contents[] = array('align' => 'center', 'text' => '<a href="' . smn_href_link(FILENAME_CATEGORIES, 'cPath=' . $category_path_string . '&cID=' . $cInfo->categories_id . '&action=edit_category') . '">' . smn_image_button('button_edit.gif', IMAGE_EDIT) . '</a> <a href="' . smn_href_link(FILENAME_CATEGORIES, 'cPath=' . $category_path_string . '&cID=' . $cInfo->categories_id . '&action=delete_category') . '">' . smn_image_button('button_delete.gif', IMAGE_DELETE) . '</a> <a href="' . smn_href_link(FILENAME_CATEGORIES, 'cPath=' . $category_path_string . '&cID=' . $cInfo->categories_id . '&action=move_category') . '">' . smn_image_button('button_move.gif', IMAGE_MOVE) . '</a>');
Пример #16
0
 case 'new':
     $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_NEW_ZONE . '</b>');
     $contents = array('form' => smn_draw_form('zones', FILENAME_ZONES, 'page=' . $_GET['page'] . '&action=insert'));
     $contents[] = array('text' => TEXT_INFO_INSERT_INTRO);
     $contents[] = array('text' => '<br>' . TEXT_INFO_ZONES_NAME . '<br>' . smn_draw_input_field('zone_name'));
     $contents[] = array('text' => '<br>' . TEXT_INFO_ZONES_CODE . '<br>' . smn_draw_input_field('zone_code'));
     $contents[] = array('text' => '<br>' . TEXT_INFO_COUNTRY_NAME . '<br>' . smn_draw_pull_down_menu('zone_country_id', smn_get_countries()));
     $contents[] = array('align' => 'center', 'text' => '<br>' . smn_image_submit('button_insert.gif', IMAGE_INSERT) . '&nbsp;<a href="' . smn_href_link(FILENAME_ZONES, 'page=' . $_GET['page']) . '">' . smn_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>');
     break;
 case 'edit':
     $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_EDIT_ZONE . '</b>');
     $contents = array('form' => smn_draw_form('zones', FILENAME_ZONES, 'page=' . $_GET['page'] . '&cID=' . $cInfo->zone_id . '&action=save'));
     $contents[] = array('text' => TEXT_INFO_EDIT_INTRO);
     $contents[] = array('text' => '<br>' . TEXT_INFO_ZONES_NAME . '<br>' . smn_draw_input_field('zone_name', $cInfo->zone_name));
     $contents[] = array('text' => '<br>' . TEXT_INFO_ZONES_CODE . '<br>' . smn_draw_input_field('zone_code', $cInfo->zone_code));
     $contents[] = array('text' => '<br>' . TEXT_INFO_COUNTRY_NAME . '<br>' . smn_draw_pull_down_menu('zone_country_id', smn_get_countries(), $cInfo->countries_id));
     $contents[] = array('align' => 'center', 'text' => '<br>' . smn_image_submit('button_update.gif', IMAGE_UPDATE) . '&nbsp;<a href="' . smn_href_link(FILENAME_ZONES, 'page=' . $_GET['page'] . '&cID=' . $cInfo->zone_id) . '">' . smn_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>');
     break;
 case 'delete':
     $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_DELETE_ZONE . '</b>');
     $contents = array('form' => smn_draw_form('zones', FILENAME_ZONES, 'page=' . $_GET['page'] . '&cID=' . $cInfo->zone_id . '&action=deleteconfirm'));
     $contents[] = array('text' => TEXT_INFO_DELETE_INTRO);
     $contents[] = array('text' => '<br><b>' . $cInfo->zone_name . '</b>');
     $contents[] = array('align' => 'center', 'text' => '<br>' . smn_image_submit('button_delete.gif', IMAGE_DELETE) . '&nbsp;<a href="' . smn_href_link(FILENAME_ZONES, 'page=' . $_GET['page'] . '&cID=' . $cInfo->zone_id) . '">' . smn_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>');
     break;
 default:
     if (isset($cInfo) && is_object($cInfo)) {
         $heading[] = array('text' => '<b>' . $cInfo->zone_name . '</b>');
         $contents[] = array('align' => 'center', 'text' => '<a href="' . smn_href_link(FILENAME_ZONES, 'page=' . $_GET['page'] . '&cID=' . $cInfo->zone_id . '&action=edit') . '">' . smn_image_button('button_edit.gif', IMAGE_EDIT) . '</a> <a href="' . smn_href_link(FILENAME_ZONES, 'page=' . $_GET['page'] . '&cID=' . $cInfo->zone_id . '&action=delete') . '">' . smn_image_button('button_delete.gif', IMAGE_DELETE) . '</a>');
         $contents[] = array('text' => '<br>' . TEXT_INFO_ZONES_NAME . '<br>' . $cInfo->zone_name . ' (' . $cInfo->zone_code . ')');
         $contents[] = array('text' => '<br>' . TEXT_INFO_COUNTRY_NAME . ' ' . $cInfo->countries_name);
Пример #17
0
            }
            $boxContent .= '<a href="' . smn_href_link(FILENAME_DEFAULT, 'ID=1&manufacturers_id=' . $manufacturers['manufacturers_id']) . '">' . $manufacturers_name . '</a><br>';
        }
        $boxContent = substr($boxContent, 0, -4);
    } else {
        // Display a drop-down
        $manufacturers_array = array();
        if (MAX_MANUFACTURERS_LIST < 2) {
            $manufacturers_array[] = array('id' => '', 'text' => PULL_DOWN_DEFAULT);
        }
        while ($manufacturers = smn_db_fetch_array($manufacturers_query)) {
            $manufacturers_name = strlen($manufacturers['manufacturers_name']) > MAX_DISPLAY_MANUFACTURER_NAME_LEN ? substr($manufacturers['manufacturers_name'], 0, MAX_DISPLAY_MANUFACTURER_NAME_LEN) . '..' : $manufacturers['manufacturers_name'];
            $manufacturers_array[] = array('id' => $manufacturers['manufacturers_id'], 'text' => $manufacturers_name);
        }
        if ($session_started == true && smn_not_null($SID)) {
            $link = 'ID=1&' . smn_session_name() . '=' . smn_session_id();
        } else {
            $link = 'ID=1';
        }
        $boxContent = smn_draw_form('manufacturers', smn_href_link(FILENAME_DEFAULT, $link, 'NONSSL', false), 'get');
        $boxContent .= smn_draw_pull_down_menu('manufacturers_id', $manufacturers_array, isset($_GET['manufacturers_id']) ? $_GET['manufacturers_id'] : '', 'onChange="this.form.submit();" size="' . MAX_MANUFACTURERS_LIST . '" style="width: 100%"');
        $boxContent .= '</form>';
    }
    $boxContent .= smn_hide_session_id();
    if (file_exists(DIR_WS_BOX_TEMPLATES . $box_base_name . '.php')) {
        require DIR_WS_BOX_TEMPLATES . $box_base_name . '.php';
    } else {
        require DEFAULT_TEMPLATENAME_BOX;
    }
    $boxContent_attributes = '';
}
Пример #18
0
      </tr>
      <tr>
        <td><?php echo smn_draw_separator('pixel_trans.gif', '1', '5'); ?></td>
      </tr>
      <tr><?php echo smn_draw_form('status', smn_href_link(FILENAME_STORE_ORDER_EDIT,  smn_get_all_get_params(array('action')) . 'action=update_order&ID='.$store_id,'NONSSL'),'POST'); ?>
        <td class="main"><?php echo smn_draw_textarea_field('comments', 'soft', '60', '5'); ?></td>
      </tr>
      <tr>
        <td><?php echo smn_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
      </tr>
      <tr>
        <td><table border="0" cellspacing="0" cellpadding="2">
          <tr>
            <td><table border="0" cellspacing="0" cellpadding="2">
              <tr>
                <td class="main"><b><?php echo ENTRY_STATUS; ?></b> <?php echo smn_draw_pull_down_menu('status', $orders_statuses, $order->info['orders_status']); ?></td>
              </tr>
              <tr>
                <td class="main"><b><?php echo ENTRY_NOTIFY_CUSTOMER; ?></b> <?php echo smn_draw_checkbox_field('notify', '', true); ?></td>
                <td class="main"><b><?php echo ENTRY_NOTIFY_COMMENTS; ?></b> <?php echo smn_draw_checkbox_field('notify_comments', '', true); ?></td>
              </tr>
            </table></td>
            <td valign="top"><?php echo smn_image_submit('button_update.gif', IMAGE_UPDATE); ?></td>
          </tr>
        </table></td>
      </form></tr>
      <tr>
        <td colspan="2" align="right"><?php echo '<a href="' . smn_href_link(FILENAME_ORDERS_INVOICE, 'oID=' . $_GET['oID']) . '" TARGET="_blank">' . smn_image_button('small_invoice.gif', IMAGE_ORDERS_INVOICE) . '</a> <a href="' . smn_href_link(FILENAME_ORDERS_PACKINGSLIP, 'oID=' . $_GET['oID']) . '" TARGET="_blank">' . smn_image_button('button_packingslip.gif', IMAGE_ORDERS_PACKINGSLIP) . '</a> <a href="' . smn_href_link(FILENAME_STORE_ORDER_TOOL,'ID='.$store_id) . '">' . smn_image_button('small_back.gif', IMAGE_BACK) . '</a>'; ?></td>
      </tr>
	  
<?php
Пример #19
0
</td>
              </tr>
              <tr>
                <td colspan="2"><?php 
echo smn_draw_separator('pixel_trans.gif', '100%', '10');
?>
</td>
              </tr>
<!-- systemsmanager begin
              <tr>
                <td class="fieldKey"><?php 
echo ENTRY_MANUFACTURERS;
?>
</td>
                <td class="fieldValue"><?php 
echo smn_draw_pull_down_menu('manufacturers_id', smn_get_manufacturers(array(array('id' => '', 'text' => TEXT_ALL_MANUFACTURERS))));
?>
</td>
              </tr>
              <tr>
                <td colspan="2"><?php 
echo smn_draw_separator('pixel_trans.gif', '100%', '10');
?>
</td>
              </tr>
-- systemsmanager end -->
              <tr>
                <td class="fieldKey"><?php 
echo ENTRY_PRICE_FROM;
?>
</td>
Пример #20
0
/*
  Copyright (c) 2002 - 2006 SystemsManager.Net
  SystemsManager Technologies
  oscMall System Version 4
  http://www.systemsmanager.net
  
  Portions Copyright (c) 2002 osCommerce
  
  This source file is subject to version 2.0 of the GPL license,   
  that is bundled with this package in the file LICENSE. If you
  did not receive a copy of the oscMall System license and are unable 
  to obtain it through the world-wide-web, please send a note to    
  license@systemsmanager.net so we can mail you a copy immediately.
*/
$boxHeading = "";
$box_base_name = 'search2';
$box_id = $box_base_name . 'Box';
$boxContent = smn_draw_form('quick_find', smn_href_link(FILENAME_ADVANCED_SEARCH_RESULT, 'ID=1', 'NONSSL', false), 'post');
$boxContent .= '<table HEIGHT="40" CELLSPACING="0" CELLPADDING="0" align="left"><tr><td HEIGHT="40" class="search_css">' . 'SEARCH: ';
$boxContent .= smn_draw_pull_down_menu('categories_id', smn_get_categories_extended(array(array('id' => '', 'text' => 'All Stores'))), '0', '') . '&nbsp;&nbsp;';
$boxContent .= smn_draw_hidden_field('search_in_description', '1');
$boxContent .= '<br/>FOR: ' . smn_draw_input_field('keywords', '', 'size="20" maxlength="30" ') . '&nbsp;' . smn_hide_session_id() . smn_image_submit('button_quick_find.gif', 'Go Search', 'align="absmiddle"');
$boxContent .= '&nbsp;&nbsp;&nbsp;<a href="' . smn_href_link(FILENAME_ADVANCED_SEARCH) . '"><b>' . BOX_SEARCH_ADVANCED_SEARCH . '</b></a>';
$boxContent .= '</td></tr></table></form>';
if (file_exists(DIR_WS_BOX_TEMPLATES . $box_base_name . '.php')) {
    require DIR_WS_BOX_TEMPLATES . $box_base_name . '.php';
} else {
    require DEFAULT_TEMPLATENAME_BOX;
}
$boxContent_attributes = '';
Пример #21
0
if ($action == 'list') {
    switch ($saction) {
        case 'new':
            $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_NEW_SUB_ZONE . '</b>');
            $contents = array('form' => smn_draw_form('zones', FILENAME_GEO_ZONES, 'zpage=' . $_GET['zpage'] . '&zID=' . $_GET['zID'] . '&action=list&spage=' . $_GET['spage'] . '&' . (isset($_GET['sID']) ? 'sID=' . $_GET['sID'] . '&' : '') . 'saction=insert_sub'));
            $contents[] = array('text' => TEXT_INFO_NEW_SUB_ZONE_INTRO);
            $contents[] = array('text' => '<br>' . TEXT_INFO_COUNTRY . '<br>' . smn_draw_pull_down_menu('zone_country_id', smn_get_countries(TEXT_ALL_COUNTRIES), '', 'onChange="update_zone(this.form);"'));
            $contents[] = array('text' => '<br>' . TEXT_INFO_COUNTRY_ZONE . '<br>' . smn_draw_pull_down_menu('zone_id', smn_prepare_country_zones_pull_down()));
            $contents[] = array('align' => 'center', 'text' => '<br>' . smn_image_submit('button_insert.gif', IMAGE_INSERT) . ' <a href="' . smn_href_link(FILENAME_GEO_ZONES, 'zpage=' . $_GET['zpage'] . '&zID=' . $_GET['zID'] . '&action=list&spage=' . $_GET['spage'] . '&' . (isset($_GET['sID']) ? 'sID=' . $_GET['sID'] : '')) . '">' . smn_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>');
            break;
        case 'edit':
            $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_EDIT_SUB_ZONE . '</b>');
            $contents = array('form' => smn_draw_form('zones', FILENAME_GEO_ZONES, 'zpage=' . $_GET['zpage'] . '&zID=' . $_GET['zID'] . '&action=list&spage=' . $_GET['spage'] . '&sID=' . $sInfo->association_id . '&saction=save_sub'));
            $contents[] = array('text' => TEXT_INFO_EDIT_SUB_ZONE_INTRO);
            $contents[] = array('text' => '<br>' . TEXT_INFO_COUNTRY . '<br>' . smn_draw_pull_down_menu('zone_country_id', smn_get_countries(TEXT_ALL_COUNTRIES), $sInfo->zone_country_id, 'onChange="update_zone(this.form);"'));
            $contents[] = array('text' => '<br>' . TEXT_INFO_COUNTRY_ZONE . '<br>' . smn_draw_pull_down_menu('zone_id', smn_prepare_country_zones_pull_down($sInfo->zone_country_id), $sInfo->zone_id));
            $contents[] = array('align' => 'center', 'text' => '<br>' . smn_image_submit('button_update.gif', IMAGE_UPDATE) . ' <a href="' . smn_href_link(FILENAME_GEO_ZONES, 'zpage=' . $_GET['zpage'] . '&zID=' . $_GET['zID'] . '&action=list&spage=' . $_GET['spage'] . '&sID=' . $sInfo->association_id) . '">' . smn_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>');
            break;
        case 'delete':
            $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_DELETE_SUB_ZONE . '</b>');
            $contents = array('form' => smn_draw_form('zones', FILENAME_GEO_ZONES, 'zpage=' . $_GET['zpage'] . '&zID=' . $_GET['zID'] . '&action=list&spage=' . $_GET['spage'] . '&sID=' . $sInfo->association_id . '&saction=deleteconfirm_sub'));
            $contents[] = array('text' => TEXT_INFO_DELETE_SUB_ZONE_INTRO);
            $contents[] = array('text' => '<br><b>' . $sInfo->countries_name . '</b>');
            $contents[] = array('align' => 'center', 'text' => '<br>' . smn_image_submit('button_delete.gif', IMAGE_DELETE) . ' <a href="' . smn_href_link(FILENAME_GEO_ZONES, 'zpage=' . $_GET['zpage'] . '&zID=' . $_GET['zID'] . '&action=list&spage=' . $_GET['spage'] . '&sID=' . $sInfo->association_id) . '">' . smn_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>');
            break;
        default:
            if (isset($sInfo) && is_object($sInfo)) {
                $heading[] = array('text' => '<b>' . $sInfo->countries_name . '</b>');
                $contents[] = array('align' => 'center', 'text' => '<a href="' . smn_href_link(FILENAME_GEO_ZONES, 'zpage=' . $_GET['zpage'] . '&zID=' . $_GET['zID'] . '&action=list&spage=' . $_GET['spage'] . '&sID=' . $sInfo->association_id . '&saction=edit') . '">' . smn_image_button('button_edit.gif', IMAGE_EDIT) . '</a> <a href="' . smn_href_link(FILENAME_GEO_ZONES, 'zpage=' . $_GET['zpage'] . '&zID=' . $_GET['zID'] . '&action=list&spage=' . $_GET['spage'] . '&sID=' . $sInfo->association_id . '&saction=delete') . '">' . smn_image_button('button_delete.gif', IMAGE_DELETE) . '</a>');
                $contents[] = array('text' => '<br>' . TEXT_INFO_DATE_ADDED . ' ' . smn_date_short($sInfo->date_added));
                if (smn_not_null($sInfo->last_modified)) {
          </tr>
          <tr>
            <td class="main" align="right"><?php 
echo TITLE_TYPE . ' ' . smn_draw_pull_down_menu('type', $type_array, smn_not_null($type) ? $type : 'daily', 'onChange="this.form.submit();"');
?>
<noscript><input type="submit" value="GO"></noscript><br>
<?php 
switch ($type) {
    case 'yearly':
        break;
    case 'monthly':
        echo TITLE_YEAR . ' ' . smn_draw_pull_down_menu('year', $years_array, isset($_GET['year']) ? $_GET['year'] : date('Y'), 'onChange="this.form.submit();"') . '<noscript><input type="submit" value="GO"></noscript>';
        break;
    default:
    case 'daily':
        echo TITLE_MONTH . ' ' . smn_draw_pull_down_menu('month', $months_array, isset($_GET['month']) ? $_GET['month'] : date('n'), 'onChange="this.form.submit();"') . '<noscript><input type="submit" value="GO"></noscript><br>' . TITLE_YEAR . ' ' . smn_draw_pull_down_menu('year', $years_array, isset($_GET['year']) ? $_GET['year'] : date('Y'), 'onChange="this.form.submit();"') . '<noscript><input type="submit" value="GO"></noscript>';
        break;
}
?>
            </td>
          <?php 
echo smn_draw_hidden_field('page', $_GET['page']) . smn_draw_hidden_field('bID', $_GET['bID']) . smn_hide_session_id();
?>
</form></tr>
        </table></td>
      </tr>
      <tr>
        <td><?php 
echo smn_draw_separator('pixel_trans.gif', '1', '10');
?>
</td>
Пример #23
0
</td>
      </tr>
      <tr><?php 
    echo smn_draw_form('newsletter', FILENAME_NEWSLETTERS, (isset($HTTP_GET_VARS['page']) ? 'page=' . $HTTP_GET_VARS['page'] . '&' : '') . 'action=' . $form_action);
    if ($form_action == 'update') {
        echo smn_draw_hidden_field('newsletter_id', $nID);
    }
    ?>
        <td><table border="0" cellspacing="0" cellpadding="2">
          <tr>
            <td class="main"><?php 
    echo TEXT_NEWSLETTER_MODULE;
    ?>
</td>
            <td class="main"><?php 
    echo smn_draw_pull_down_menu('module', $modules_array, $nInfo->module);
    ?>
</td>
          </tr>
          <tr>
            <td colspan="2"><?php 
    echo smn_draw_separator('pixel_trans.gif', '1', '10');
    ?>
</td>
          </tr>
          <tr>
            <td class="main"><?php 
    echo TEXT_NEWSLETTER_TITLE;
    ?>
</td>
            <td class="main"><?php 
Пример #24
0
function smn_get_country_list($name, $selected = '', $parameters = '')
{
    $countries_array = array(array('id' => '', 'text' => PULL_DOWN_DEFAULT));
    $countries = smn_get_countries();
    for ($i = 0, $n = sizeof($countries); $i < $n; $i++) {
        $countries_array[] = array('id' => $countries[$i]['countries_id'], 'text' => $countries[$i]['countries_name']);
    }
    return smn_draw_pull_down_menu($name, $countries_array, $selected, $parameters);
}
Пример #25
0
<table border="0" width="100%" cellspacing="0" cellpadding="0">
      <tr>
        <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
          <tr>
            <td class="pageHeading"><?php 
echo BOX_CATALOG_DEFINE_MAINPAGE;
?>
</td>
          </tr>
        </table></td>
      </tr>
          <tr><?php 
echo smn_draw_form('lng', FILENAME_DEFINE_MAINPAGE, '', 'get');
?>
            <td align="right"><?php 
echo smn_draw_pull_down_menu('lngdir', $languages_array, '', 'onChange="this.form.submit();"');
?>
</td>
          </form></tr>
      <tr>
        <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
<?php 
if ($_GET['lngdir'] && $_GET['filename']) {
    if ($_GET['filename'] == $language . '.php') {
        $file = DIR_FS_CATALOG_LANGUAGES . $_GET['filename'];
    } else {
        $file = DIR_FS_CATALOG_LANGUAGES . $_GET['lngdir'] . '/' . $_GET['filename'];
    }
    if (file_exists($file)) {
        $file_array = @file($file);
        $file_contents = @implode('', $file_array);
?>
</td>
                <td class="main"><?php 
echo smn_draw_input_field('lastname', '', 'id="lastname"') . '&nbsp;' . (smn_not_null(ENTRY_LAST_NAME_TEXT) ? '<span class="inputRequirement">' . ENTRY_LAST_NAME_TEXT . '</span>' : '');
?>
</td>
                <td class="main"></td>
              </tr>

              <tr>
                <td class="main"><?php 
echo ENTRY_DATE_OF_BIRTH;
?>
</td>
                <td class="main"><?php 
echo smn_draw_pull_down_menu('dob_day', $day_drop_down_array) . smn_draw_pull_down_menu('dob_month', $month_drop_down_array) . smn_draw_pull_down_menu('dob_year', $year_drop_down_array) . '&nbsp;' . (smn_not_null(ENTRY_DATE_OF_BIRTH_TEXT) ? '<span class="inputRequirement">' . ENTRY_DATE_OF_BIRTH_TEXT . '</span>' : NOT_REQUIRED_TEXT);
?>
</td>
                <td class="main">&nbsp;</td>
              </tr>

              <tr>
                <td class="main"><?php 
echo ENTRY_EMAIL_ADDRESS;
?>
</td>
                <td class="main"><?php 
echo smn_draw_input_field('email_address', '', 'id="email_address"') . '&nbsp;' . (smn_not_null(ENTRY_EMAIL_ADDRESS_TEXT) ? '<span class="inputRequirement">' . ENTRY_EMAIL_ADDRESS_TEXT . '</span>' : '');
?>
</td>
                <td class="main">&nbsp;</td>
Пример #27
0
echo ENTRY_DATE_OF_BIRTH;
?>
</label></td>
     <td><?php 
$dob = explode('-', $customerInfo->customer_data['customers_dob']);
$today = getdate();
for ($i = 1; $i <= 31; $i++) {
    $day_drop_down_array[] = array('id' => sprintf('%02d', $i), 'text' => $i);
}
for ($i = 1; $i <= 12; $i++) {
    $month_drop_down_array[] = array('id' => sprintf('%02d', $i), 'text' => strftime('%B', mktime(0, 0, 0, $i, 1, $today['year'])));
}
for ($i = 1935; $i <= (int) $today['year']; $i++) {
    $year_drop_down_array[] = array('id' => $i, 'text' => $i);
}
echo smn_draw_pull_down_menu('dob_day', $day_drop_down_array, $dob[0], 'id="dob_day"') . '&nbsp;' . smn_draw_pull_down_menu('dob_month', $month_drop_down_array, $dob[1], 'id="dob_month"') . '&nbsp;' . smn_draw_pull_down_menu('dob_year', $year_drop_down_array, $dob[2], 'id="dob_year"');
?>
</td>
    </tr>
    <tr>
     <td class="main"><label for="email_address"><?php 
echo ENTRY_EMAIL_ADDRESS;
?>
</label></td>
     <td><?php 
echo smn_draw_input_field('email_address', $customerInfo->customer_data['customers_email_address'], 'id="email_address"');
?>
</td>
    </tr>
   </table>
  </fieldset>
Пример #28
0
    $customers = array();
    $customers[] = array('id' => '', 'text' => TEXT_SELECT_CUSTOMER);
    $customers[] = array('id' => '***', 'text' => TEXT_ALL_CUSTOMERS);
    $customers[] = array('id' => '**D', 'text' => TEXT_NEWSLETTER_CUSTOMERS);
    $mail_query = smn_db_query("select distinct(customers.customers_email_address), customers_firstname, customers_lastname from " . TABLE_CUSTOMERS . ", " . TABLE_ORDERS . " where customers.customers_id = orders.customers_id and orders.store_id = " . $store_id . " group by customers.customers_id order by customers_lastname");
    while ($customers_values = smn_db_fetch_array($mail_query)) {
        $customers[] = array('id' => $customers_values['customers_email_address'], 'text' => $customers_values['customers_lastname'] . ', ' . $customers_values['customers_firstname'] . ' (' . $customers_values['customers_email_address'] . ')');
    }
    ?>
              <tr>
                <td class="main"><?php 
    echo TEXT_CUSTOMER;
    ?>
</td>
                <td><?php 
    echo smn_draw_pull_down_menu('customers_email_address', $customers, isset($_GET['customer']) ? $_GET['customer'] : '');
    ?>
</td>
              </tr>
              <tr>
                <td colspan="2"><?php 
    echo smn_draw_separator('pixel_trans.gif', '1', '10');
    ?>
</td>
              </tr>
              <tr>
                <td class="main"><?php 
    echo TEXT_FROM;
    ?>
</td>
                <td><?php 
Пример #29
0
        <td class="main"><?php 
        echo NEW_TEXT_PAGE_NAME;
        ?>
</td>
        <td class="main"><?php 
        echo smn_draw_separator('pixel_trans.gif', '24', '15') . '&nbsp;' . smn_draw_input_field('new_catagory', $pInfo->page_name) . '&nbsp;' . NEW_TEXT_ARTICLE_REQUIREMENT;
        ?>
</td>
      </tr>
      <tr>
        <td class="main"><?php 
        echo CURRENT_TEXT_PAGE_NAME;
        ?>
</td>
        <td class="main"><?php 
        echo smn_draw_separator('pixel_trans.gif', '24', '15') . '&nbsp;' . smn_draw_pull_down_menu('use_current_catagory', $new_page_array, $new_page_array[1]);
        ?>
</td>
      </tr>    
      <tr>  
        <td class="main"><?php 
        echo NEW_TEXT_KEY_TITLE;
        ?>
</td>
        <td class="main"><?php 
        echo smn_draw_separator('pixel_trans.gif', '24', '15') . '&nbsp;' . smn_draw_input_field('text_key', $pInfo->text_key) . '&nbsp;' . NEW_TEXT_KEY_REQUIREMENT;
        ?>
</td>
      </tr>
<?php 
    }
Пример #30
0
     $contents = array('form' => smn_draw_form('countries', FILENAME_COUNTRIES, 'page=' . $_GET['page'] . '&action=insert'));
     $contents[] = array('text' => TEXT_INFO_INSERT_INTRO);
     $contents[] = array('text' => '<br>' . TEXT_INFO_COUNTRY_NAME . '<br>' . smn_draw_input_field('countries_name'));
     $contents[] = array('text' => '<br>' . TEXT_INFO_COUNTRY_CODE_2 . '<br>' . smn_draw_input_field('countries_iso_code_2'));
     $contents[] = array('text' => '<br>' . TEXT_INFO_COUNTRY_CODE_3 . '<br>' . smn_draw_input_field('countries_iso_code_3'));
     $contents[] = array('text' => '<br>' . TEXT_INFO_ADDRESS_FORMAT . '<br>' . smn_draw_pull_down_menu('address_format_id', smn_get_address_formats()));
     $contents[] = array('align' => 'center', 'text' => '<br>' . smn_image_submit('button_insert.gif', IMAGE_INSERT) . '&nbsp;<a href="' . smn_href_link(FILENAME_COUNTRIES, 'page=' . $_GET['page']) . '">' . smn_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>');
     break;
 case 'edit':
     $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_EDIT_COUNTRY . '</b>');
     $contents = array('form' => smn_draw_form('countries', FILENAME_COUNTRIES, 'page=' . $_GET['page'] . '&cID=' . $cInfo->countries_id . '&action=save'));
     $contents[] = array('text' => TEXT_INFO_EDIT_INTRO);
     $contents[] = array('text' => '<br>' . TEXT_INFO_COUNTRY_NAME . '<br>' . smn_draw_input_field('countries_name', $cInfo->countries_name));
     $contents[] = array('text' => '<br>' . TEXT_INFO_COUNTRY_CODE_2 . '<br>' . smn_draw_input_field('countries_iso_code_2', $cInfo->countries_iso_code_2));
     $contents[] = array('text' => '<br>' . TEXT_INFO_COUNTRY_CODE_3 . '<br>' . smn_draw_input_field('countries_iso_code_3', $cInfo->countries_iso_code_3));
     $contents[] = array('text' => '<br>' . TEXT_INFO_ADDRESS_FORMAT . '<br>' . smn_draw_pull_down_menu('address_format_id', smn_get_address_formats(), $cInfo->address_format_id));
     $contents[] = array('align' => 'center', 'text' => '<br>' . smn_image_submit('button_update.gif', IMAGE_UPDATE) . '&nbsp;<a href="' . smn_href_link(FILENAME_COUNTRIES, 'page=' . $_GET['page'] . '&cID=' . $cInfo->countries_id) . '">' . smn_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>');
     break;
 case 'delete':
     $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_DELETE_COUNTRY . '</b>');
     $contents = array('form' => smn_draw_form('countries', FILENAME_COUNTRIES, 'page=' . $_GET['page'] . '&cID=' . $cInfo->countries_id . '&action=deleteconfirm'));
     $contents[] = array('text' => TEXT_INFO_DELETE_INTRO);
     $contents[] = array('text' => '<br><b>' . $cInfo->countries_name . '</b>');
     $contents[] = array('align' => 'center', 'text' => '<br>' . smn_image_submit('button_delete.gif', IMAGE_UPDATE) . '&nbsp;<a href="' . smn_href_link(FILENAME_COUNTRIES, 'page=' . $_GET['page'] . '&cID=' . $cInfo->countries_id) . '">' . smn_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>');
     break;
 default:
     if (is_object($cInfo)) {
         $heading[] = array('text' => '<b>' . $cInfo->countries_name . '</b>');
         $contents[] = array('align' => 'center', 'text' => '<a href="' . smn_href_link(FILENAME_COUNTRIES, 'page=' . $_GET['page'] . '&cID=' . $cInfo->countries_id . '&action=edit') . '">' . smn_image_button('button_edit.gif', IMAGE_EDIT) . '</a> <a href="' . smn_href_link(FILENAME_COUNTRIES, 'page=' . $_GET['page'] . '&cID=' . $cInfo->countries_id . '&action=delete') . '">' . smn_image_button('button_delete.gif', IMAGE_DELETE) . '</a>');
         $contents[] = array('text' => '<br>' . TEXT_INFO_COUNTRY_NAME . '<br>' . $cInfo->countries_name);
         $contents[] = array('text' => '<br>' . TEXT_INFO_COUNTRY_CODE_2 . ' ' . $cInfo->countries_iso_code_2);