コード例 #1
0
ファイル: currencies.php プロジェクト: abhiesa-tolexo/loaded7
 public function initialize()
 {
     global $lC_Session, $lC_Currencies;
     $data = array();
     foreach ($lC_Currencies->currencies as $key => $value) {
         $data[] = array('id' => $key, 'text' => $value['title']);
     }
     if (sizeof($data) > 1) {
         $hidden_get_variables = '';
         foreach ($_GET as $key => $value) {
             if ($key != 'currency' && $key != $lC_Session->getName() && $key != 'x' && $key != 'y') {
                 $hidden_get_variables .= lc_draw_hidden_field($key, $value);
             }
         }
         $this->_content = '<li class="box-currencies-selection">' . lc_draw_pull_down_menu('currency', $data, $_SESSION['currency'], 'class="box-currencies-select" onchange="$(this).closest(\'form\').submit();"') . $hidden_get_variables . lc_draw_hidden_session_id_field() . '</li>' . "\n";
     }
 }
コード例 #2
0
ファイル: templates.php プロジェクト: abhiesa-tolexo/loaded7
 public function initialize()
 {
     global $lC_Session;
     $data = array();
     // added to allow a reset to the DEFAULT_TEMPLATE database setting
     $reset = array();
     $reset[] = array('id' => 'reset', 'text' => 'Clear Template Selection');
     foreach (lC_Template::getTemplates() as $template) {
         $data[] = array('id' => $template['code'], 'text' => $template['title']);
     }
     // merge the reset option into the templates dropdown selection array
     $data = array_merge($reset, $data);
     if (sizeof($data) > 1) {
         $hidden_get_variables = '';
         foreach ($_GET as $key => $value) {
             if ($key != 'template' && $key != $lC_Session->getName() && $key != 'x' && $key != 'y') {
                 $hidden_get_variables .= lc_draw_hidden_field($key, $value);
             }
         }
         $this->_content = '<li class="box-templates-selection">' . $hidden_get_variables . lc_draw_pull_down_menu('template', $data, $_SESSION['template']['code'], 'class="box-templates-select" onchange="$(this).closest(\'form\').submit();"') . lc_draw_hidden_session_id_field() . '</li>';
     }
 }
コード例 #3
0
ファイル: edit.php プロジェクト: abhiesa-tolexo/loaded7
?>
</p>
                </div>
                <!-- VQMOD-hookpoint; DO NOT MODIFY OR REMOVE THE LINE BELOW -->
                <div id="edit-category-relationship-right-div" class="six-columns twelve-columns-mobile">
                </div>
              </div>
            </fieldset>
          </div>
        </div>
      </div>
      <?php 
echo lc_draw_hidden_field('sort_order', $cInfo['sort_order']);
?>
      <?php 
echo lc_draw_hidden_field('subaction', 'confirm');
?>
      <div class="clear-both"></div>
      <div class="six-columns twelve-columns-tablet">
        <div id="buttons-menu-div-listing">
          <div id="buttons-container" style="position: relative;" class="clear-both">
            <div class="align-right">
              <p class="button-height">
                <?php 
$save = (int) $_SESSION['admin']['access'][$lC_Template->getModule()] < 3 ? '' : ' onclick="validateForm(\'#category\');"';
$close = lc_href_link_admin(FILENAME_DEFAULT, $lC_Template->getModule() . ($_GET['cid'] != '') ? 'categories=' . $_GET['cid'] : '');
button_save_close($save, true, $close);
?>
              </p>
            </div>
          </div>
コード例 #4
0
ファイル: database.php プロジェクト: rajeshb001/itpl_loaded7
 public function getBatchPagesPullDownMenu($batch_keyword = 'page', $parameters = '')
 {
     global $lC_Language;
     $number_of_pages = ceil($this->batch_size / $this->batch_rows);
     if ($number_of_pages > 1) {
         $pages_array = array();
         for ($i = 1; $i <= $number_of_pages; $i++) {
             $pages_array[] = array('id' => $i, 'text' => $i);
         }
         $hidden_parameter = '';
         if (!empty($parameters)) {
             $parameters = explode('&', $parameters);
             foreach ($parameters as $parameter) {
                 $keys = explode('=', $parameter, 2);
                 if ($keys[0] != $batch_keyword) {
                     $hidden_parameter .= lc_draw_hidden_field($keys[0], isset($keys[1]) ? $keys[1] : '');
                 }
             }
         }
         $string = '<form action="' . lc_href_link(basename($_SERVER['SCRIPT_FILENAME'])) . '" action="get">' . $hidden_parameter . '<a href="javascript:void(0);">' . sprintf($lC_Language->get('result_set_current_page'), lc_draw_pull_down_menu($batch_keyword, $pages_array, $this->batch_number, 'onchange="this.form.submit();"'), $number_of_pages) . '</a>' . lc_draw_hidden_session_id_field() . '</form>';
     } else {
         $string = '<a href="javascript:void(0);">' . sprintf($lC_Language->get('result_set_current_page'), 1, 1) . '</a>';
     }
     return $string;
 }
コード例 #5
0
ファイル: edit.php プロジェクト: rajeshb001/itpl_loaded7
echo lc_icon_admin('edit.png') . ' ' . $lC_ObjectInfo->getProtected('products_name');
?>
</div>
<div class="infoBoxContent">
  <form name="pEdit" action="<?php 
echo lc_href_link_admin(FILENAME_DEFAULT, $lC_Template->getModule() . '&page=' . $_GET['page'] . '&pID=' . $lC_ObjectInfo->getInt('products_id') . '&action=save');
?>
" method="post">
  <p><?php 
echo $lC_Language->get('introduction_edit_product_expected');
?>
</p>
  <p><?php 
echo $lC_Language->get('field_date_expected') . '<br />' . lc_draw_input_field('products_date_available', $lC_ObjectInfo->get('products_date_available'));
?>
</p>
  <p align="center"><?php 
echo lc_draw_hidden_field('subaction', 'confirm') . '<input type="submit" value="' . $lC_Language->get('button_save') . '" class="operationButton" /> <input type="button" value="' . $lC_Language->get('button_cancel') . '" onclick="document.location.href=\'' . lc_href_link_admin(FILENAME_DEFAULT, $lC_Template->getModule() . '&page=' . $_GET['page']) . '\';" class="operationButton" />';
?>
</p>
  </form>
</div>
<script type="text/javascript">
  $(function() {
    $("#products_date_available").datepicker( {
      dateFormat: 'yy-mm-dd',
      changeMonth: true,
      changeYear: true
    } );
  });
</script>
コード例 #6
0
                if ($lC_Shipping->numberOfQuotes() > 1 || sizeof($quotes['methods']) > 1) {
                    ?>
                              <td><?php 
                    echo $lC_Currencies->displayPrice($methods['cost'], $quotes['tax_class_id']);
                    ?>
</td>
                              <td class="text-right"><?php 
                    echo lc_draw_radio_field('shipping_mod_sel', $quotes['id'] . '_' . $methods['id'], $lC_ShoppingCart->getShippingMethod('id'), 'id="' . $quotes['id'] . '_' . $counter . '"', '');
                    ?>
</td>
                              <?php 
                } else {
                    ?>
                              <td class="content-checkout-listing-blank"></td>
                              <td class="text-right"><?php 
                    echo $lC_Currencies->displayPrice($methods['cost'], $quotes['tax_class_id']) . lc_draw_hidden_field('shipping_mod_sel', $quotes['id'] . '_' . $methods['id']);
                    ?>
</td>
                              <?php 
                }
                ?>
                            </tr>
                            <?php 
                $counter++;
                $radio_buttons++;
            }
        }
        ?>
                      </table>
                      <?php 
    }
コード例 #7
0
 public function sendEmail()
 {
     global $lC_Database, $lC_Language;
     $max_execution_time = 0.8 * (int) ini_get('max_execution_time');
     $time_start = explode(' ', PAGE_PARSE_START_TIME);
     if (isset($_POST['chosen'])) {
         $chosen = $_POST['chosen'];
     } elseif (isset($_GET['chosen'])) {
         $chosen = $_GET['chosen'];
     } elseif (isset($_POST['global'])) {
         $global = $_POST['global'];
     } elseif (isset($_GET['global'])) {
         $global = $_GET['global'];
     }
     $chosen_get_string = '';
     if (isset($chosen) && !empty($chosen)) {
         foreach ($chosen as $id) {
             $chosen_get_string .= 'chosen[]=' . $id . '&';
         }
     }
     $audience = array();
     $Qcustomers = $lC_Database->query('select customers_id, customers_firstname, customers_lastname, customers_email_address from :table_customers where global_product_notifications = 1');
     $Qcustomers->bindTable(':table_customers', TABLE_CUSTOMERS);
     $Qcustomers->execute();
     while ($Qcustomers->next()) {
         if (!isset($audience[$Qcustomers->valueInt('customers_id')])) {
             $audience[$Qcustomers->valueInt('customers_id')] = array('firstname' => $Qcustomers->value('customers_firstname'), 'lastname' => $Qcustomers->value('customers_lastname'), 'email_address' => $Qcustomers->value('customers_email_address'));
         }
     }
     $Qcustomers = $lC_Database->query('select distinct pn.customers_id, c.customers_firstname, c.customers_lastname, c.customers_email_address from :table_products_notifications pn, :table_customers c left join :table_newsletters_log nl on (c.customers_email_address = nl.email_address and nl.newsletters_id = :newsletters_id) where pn.customers_id = c.customers_id and nl.email_address is null');
     $Qcustomers->bindTable(':table_products_notifications', TABLE_PRODUCTS_NOTIFICATIONS);
     $Qcustomers->bindTable(':table_customers', TABLE_CUSTOMERS);
     $Qcustomers->bindTable(':table_newsletters_log', TABLE_NEWSLETTERS_LOG);
     $Qcustomers->bindInt(':newsletters_id', $this->_newsletter_id);
     if (isset($chosen) && !empty($chosen)) {
         $Qcustomers->appendQuery('and pn.products_id in (:products_id)');
         $Qcustomers->bindRaw(':products_id', implode(', ', $chosen));
     }
     $Qcustomers->execute();
     while ($Qcustomers->next()) {
         if (!isset($audience[$Qcustomers->valueInt('customers_id')])) {
             $audience[$Qcustomers->valueInt('customers_id')] = array('firstname' => $Qcustomers->value('customers_firstname'), 'lastname' => $Qcustomers->value('customers_lastname'), 'email_address' => $Qcustomers->value('customers_email_address'));
         }
     }
     if (sizeof($audience) > 0) {
         $lC_Mail = new lC_Mail(null, null, null, EMAIL_FROM, $this->_newsletter_title);
         $lC_Mail->setBodyPlain($this->_newsletter_content);
         foreach ($audience as $key => $value) {
             $lC_Mail->clearTo();
             $lC_Mail->addTo($value['firstname'] . ' ' . $value['lastname'], $value['email_address']);
             $lC_Mail->send();
             $Qlog = $lC_Database->query('insert into :table_newsletters_log (newsletters_id, email_address, date_sent) values (:newsletters_id, :email_address, now())');
             $Qlog->bindTable(':table_newsletters_log', TABLE_NEWSLETTERS_LOG);
             $Qlog->bindInt(':newsletters_id', $this->_newsletter_id);
             $Qlog->bindValue(':email_address', $value['email_address']);
             $Qlog->execute();
             $time_end = explode(' ', microtime());
             $timer_total = number_format($time_end[1] + $time_end[0] - ($time_start[1] + $time_start[0]), 3);
             if ($timer_total > $max_execution_time) {
                 echo '<p><font color="#38BB68"><b>' . $lC_Language->get('sending_refreshing_page') . '</b></font></p>' . '<form name="execute" action="' . lc_href_link_admin(FILENAME_DEFAULT, $lC_Template->getModule() . '&page=' . $_GET['page'] . '&nID=' . $this->_newsletter_id . '&action=send&' . (isset($global) && $global == 'true' ? 'global=true' : $chosen_get_string)) . '" method="post">' . '<p>' . lc_draw_hidden_field('subaction', 'execute') . '</p>' . '</form>' . '<script language="javascript">' . 'var counter = 3;' . 'public function counter() {' . '  count--;' . '  if (count > 0) {' . '    Id = window.setTimeout("counter()", 1000);' . '  } else {' . '    document.execute.submit();' . '  }' . '}' . '</script>';
                 exit;
             }
         }
     }
     $Qupdate = $lC_Database->query('update :table_newsletters set date_sent = now(), status = 1 where newsletters_id = :newsletters_id');
     $Qupdate->bindTable(':table_newsletters', TABLE_NEWSLETTERS);
     $Qupdate->bindInt(':newsletters_id', $this->_newsletter_id);
     $Qupdate->execute();
 }
コード例 #8
0
ファイル: upgrade_6.php プロジェクト: abhiesa-tolexo/loaded7
echo addslashes($lC_Language->get('image_button_cancel'));
?>
      </a>&nbsp;&nbsp;  
      <a href="javascript://" onclick="$('#mBox').hide(); $('#pBox').hide(); $('#upgradeForm2').submit();" class="button">
        <span class="button-icon blue-gradient glossy"><span class="icon-right-round"></span></span>
        <?php 
echo addslashes($lC_Language->get('image_button_continue'));
?>
      </a>
    </div>       
  </fieldset>
  <?php 
foreach ($_POST as $key => $value) {
    if ($key != 'x' && $key != 'y') {
        if (is_array($value)) {
            for ($i = 0, $n = sizeof($value); $i < $n; $i++) {
                echo lc_draw_hidden_field($key . '[]', $value[$i]);
            }
        } else {
            echo lc_draw_hidden_field($key, $value);
        }
    }
}
?>
  
</form>
<script>
<!--
  new autoComplete(document.getElementById('HTTP_WORK_DIRECTORY'), 'divAutoComplete');
//-->
</script>
コード例 #9
0
    if ($n > 1) {
        ?>
                      <td><?php 
        echo $selection[$i]['module'];
        ?>
</td>
                      <td class="text-right"><?php 
        echo lc_draw_radio_field('payment_method', $selection[$i]['id'], $lC_ShoppingCart->hasBillingMethod() ? $lC_ShoppingCart->getBillingMethod('id') : null, 'id="pm_' . $counter . '"', '');
        ?>
</td>
                      <?php 
    } else {
        ?>
                      <td class="content-checkout-listing-blank no-padding-left"></td>
                      <td><?php 
        echo $selection[$i]['module'] . lc_draw_hidden_field('payment_method', $selection[$i]['id']);
        ?>
</td>
                      <?php 
    }
    ?>
                    </tr>
                    
                    <?php 
    if (isset($selection[$i]['error'])) {
        ?>
                      <tr><td colspan="2" class=""><?php 
        echo $selection[$i]['error'];
        ?>
</td></tr>
                      <?php 
コード例 #10
0
ファイル: output.php プロジェクト: abhiesa-tolexo/loaded7
 private static function _getProductsListingData()
 {
     global $lC_Database, $lC_Language, $lC_Products, $lC_Vqmod;
     include_once $lC_Vqmod->modCheck('includes/classes/products.php');
     // optional Product List Filter
     $output = '';
     $result = array();
     if (isset($_GET['manufacturers']) && !empty($_GET['manufacturers'])) {
         $filterlist_sql = "select distinct c.categories_id as id, cd.categories_name as name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd, " . TABLE_TEMPLATES_BOXES . " tb, " . TABLE_PRODUCT_ATTRIBUTES . " pa where p.products_status = '1' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and p2c.categories_id = cd.categories_id and cd.language_id = '" . (int) $lC_Language->getID() . "' and tb.code = 'manufacturers' and tb.id = pa.id and pa.products_id = p.products_id and pa.value = '" . (int) $_GET['manufacturers'] . "' order by cd.categories_name";
     } else {
         $filterlist_sql = "select distinct m.manufacturers_id as id, m.manufacturers_name as name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_MANUFACTURERS . " m where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and p.products_id = p2c.products_id and p2c.categories_id = '" . (int) $current_category_id . "' order by m.manufacturers_name";
     }
     $Qfilterlist = $lC_Database->query($filterlist_sql);
     $Qfilterlist->execute();
     if ($Qfilterlist->numberOfRows() > 1) {
         $output .= '<div class="margin-left small-margin-bottom"><form name="filter" action="' . lc_href_link(FILENAME_DEFAULT) . '" method="get"><label for="filter">' . $lC_Language->get('filter_show') . '</label>';
         if (isset($_GET['manufacturers']) && !empty($_GET['manufacturers'])) {
             $output .= lc_draw_hidden_field('manufacturers', $_GET['manufacturers']);
             $options = array(array('id' => '', 'text' => $lC_Language->get('filter_all_categories')));
         } else {
             $output .= lc_draw_hidden_field('cPath', $cPath);
             $options = array(array('id' => '', 'text' => $lC_Language->get('filter_all_manufacturers')));
         }
         if (isset($_GET['sort'])) {
             $output .= lc_draw_hidden_field('sort', $_GET['sort']);
         }
         while ($Qfilterlist->next()) {
             $options[] = array('id' => $Qfilterlist->valueInt('id'), 'text' => $Qfilterlist->value('name'));
         }
         $output .= lc_draw_pull_down_menu('filter', $options, isset($_GET['filter']) ? $_GET['filter'] : null, 'class="form-control" onchange="this.form.submit()"');
         $output .= lc_draw_hidden_session_id_field() . '</form></div>' . "\n";
     }
     if (isset($_GET['manufacturers']) && !empty($_GET['manufacturers'])) {
         $lC_Products->setManufacturer($_GET['manufacturers']);
     }
     $Qlisting = $lC_Products->execute();
     $result['mfgFilter'] = $output;
     $result['Qlisting'] = $Qlisting;
     return $result;
 }
コード例 #11
0
  @author     Loaded Commerce
  @copyright  Copyright 2003-2014 Loaded Commerce, LLC
  @copyright  Portions Copyright 2003 osCommerce
  @copyright  Template built on Developr theme by DisplayInline http://themeforest.net/user/displayinline under Extended license 
  @license    https://github.com/loadedcommerce/loaded7/blob/master/LICENSE.txt
  @version    $Id: products.php v1.0 2013-08-08 datazen $
*/
?>
<div id="section_orders_totals">
  <h3 class="show-below-768 margin-left margin-top"><?php 
echo $lC_Language->get('text_order_totals');
?>
</h3>
  <div class="columns with-padding no-margin-bottom">
    <?php 
echo lc_draw_hidden_field('action_order_total', '', 'id="action_order_total"');
?>
    <div class="new-row-mobile twelve-columns twelve-columns-mobile no-margin-bottom">
      <span class="icon-list icon-anthracite">
        <strong class="small-margin-left">
          <?php 
echo $lC_Language->get('text_order_totals');
?>
        </strong>
      </span>
    </div>
    <div class="new-row-mobile twelve-columns twelve-columns-mobile mid-margin-bottom align-right">
      <span class="mid-margin-bottom">
        <a href="javascript:void(0);" onclick="addOrderTotal(<?php 
echo $_GET[$lC_Template->getModule()];
?>
コード例 #12
0
 public function sendEmail()
 {
     global $lC_Database, $lC_Language, $lC_Template;
     $max_execution_time = 0.8 * (int) ini_get('max_execution_time');
     $time_start = explode(' ', PAGE_PARSE_START_TIME);
     $Qrecipients = $lC_Database->query('select c.customers_firstname, c.customers_lastname, c.customers_email_address from :table_customers c left join :table_newsletters_log nl on (c.customers_email_address = nl.email_address and nl.newsletters_id = :newsletters_id) where c.customers_newsletter = 1 and nl.email_address is null');
     $Qrecipients->bindTable(':table_customers', TABLE_CUSTOMERS);
     $Qrecipients->bindTable(':table_newsletters_log', TABLE_NEWSLETTERS_LOG);
     $Qrecipients->bindInt(':newsletters_id', $this->_newsletter_id);
     $Qrecipients->execute();
     if ($Qrecipients->numberOfRows() > 0) {
         $lC_Mail = new lC_Mail(null, null, null, EMAIL_FROM, $this->_newsletter_title);
         $lC_Mail->setBodyPlain($this->_newsletter_content);
         while ($Qrecipients->next()) {
             $lC_Mail->clearTo();
             $lC_Mail->addTo($Qrecipients->value('customers_firstname') . ' ' . $Qrecipients->value('customers_lastname'), $Qrecipients->value('customers_email_address'));
             $lC_Mail->send();
             $Qlog = $lC_Database->query('insert into :table_newsletters_log (newsletters_id, email_address, date_sent) values (:newsletters_id, :email_address, now())');
             $Qlog->bindTable(':table_newsletters_log', TABLE_NEWSLETTERS_LOG);
             $Qlog->bindInt(':newsletters_id', $this->_newsletter_id);
             $Qlog->bindValue(':email_address', $Qrecipients->value('customers_email_address'));
             $Qlog->execute();
             $time_end = explode(' ', microtime());
             $timer_total = number_format($time_end[1] + $time_end[0] - ($time_start[1] + $time_start[0]), 3);
             if ($timer_total > $max_execution_time) {
                 echo '<p><font color="#38BB68"><b>' . $lC_Language->get('sending_refreshing_page') . '</b></font></p>' . '<form name="execute" action="' . lc_href_link_admin(FILENAME_DEFAULT, $lC_Template->getModule() . '&page=' . $_GET['page'] . '&nID=' . $this->_newsletter_id . '&action=send') . '" method="post">' . '<p>' . lc_draw_hidden_field('subaction', 'execute') . '</p>' . '</form>' . '<script language="javascript">' . 'var counter = 3;' . 'function counter() {' . '  count--;' . '  if (count > 0) {' . '    Id = window.setTimeout("counter()", 1000);' . '  } else {' . '    document.execute.submit();' . '  }' . '}' . '</script>';
                 exit;
             }
         }
         $Qrecipients->freeResult();
     }
     $Qupdate = $lC_Database->query('update :table_newsletters set date_sent = now(), status = 1 where newsletters_id = :newsletters_id');
     $Qupdate->bindTable(':table_newsletters', TABLE_NEWSLETTERS);
     $Qupdate->bindInt(':newsletters_id', $this->_newsletter_id);
     $Qupdate->execute();
 }
コード例 #13
0
ファイル: upgrade_1.php プロジェクト: abhiesa-tolexo/loaded7
    foreach ($_POST as $key => $value) {
        if ($key != 'SOURCE_SERVER' && $key != 'SOURCE_USER' && $key != 'SOURCE_PASS' && $key != 'SOURCE_DB' && $key != 'SOURCE_IMAGE_PATH') {
            if (is_array($value)) {
                for ($i = 0, $n = sizeof($value); $i < $n; $i++) {
                    echo lc_draw_hidden_field($key . '[]', $value[$i]);
                }
            } else {
                echo lc_draw_hidden_field($key, $value);
            }
        }
    }
    echo lc_draw_hidden_field('SOURCE_SERVER', $db_server);
    echo lc_draw_hidden_field('SOURCE_USER', $db_username);
    echo lc_draw_hidden_field('SOURCE_PASS', $db_password);
    echo lc_draw_hidden_field('SOURCE_DB', $db_database);
    echo lc_draw_hidden_field('SOURCE_IMAGE_PATH', $db_image_path);
}
?>
   
</form>
<script>
  $(document).ready(function() {
    <?php 
if ($error != "") {
    ?>
	  $('#mBoxContents').html("<?php 
    echo $error;
    ?>
");
    $('#mBox').show();
    <?php 
コード例 #14
0
 function lc_draw_hidden_session_id_field()
 {
     global $lC_Session;
     if ($lC_Session->hasStarted() && !lc_empty(SID)) {
         return lc_draw_hidden_field($lC_Session->getName(), $lC_Session->getID());
     }
 }