public static function getData($id)
 {
     global $lC_Database, $lC_Language, $lC_Vqmod;
     include $lC_Vqmod->modCheck('../includes/classes/modules.php');
     $lC_Language->load('modules-' . $_GET['set']);
     include $lC_Vqmod->modCheck('../includes/modules/' . $_GET['set'] . '/' . $id . '.php');
     $module = 'lC_' . ucfirst($_GET['set']) . '_' . $id;
     $lC_Language->injectDefinitions('modules/' . $_GET['set'] . '/' . $id . '.xml');
     $module = new $module();
     $cnt = 0;
     $keys = '';
     $result = array();
     foreach ($module->getKeys() as $key) {
         $Qkey = $lC_Database->query('select configuration_title, configuration_key, configuration_value, configuration_description, use_function, set_function from :table_configuration where configuration_key = :configuration_key');
         $Qkey->bindTable(':table_configuration', TABLE_CONFIGURATION);
         $Qkey->bindValue(':configuration_key', $key);
         $Qkey->execute();
         $keys .= '<b>' . $Qkey->value('configuration_title') . '</b><br />' . $Qkey->value('configuration_description') . '<br />';
         if (!lc_empty($Qkey->value('set_function'))) {
             $keys .= lc_call_user_func($Qkey->value('set_function'), $Qkey->value('configuration_value'), $key);
         } else {
             $keys .= lc_draw_input_field('configuration[' . $key . ']', $Qkey->value('configuration_value'));
         }
         $keys .= '<br /><br />';
         $cnt++;
     }
     $result['keys'] = substr($keys, 0, strrpos($keys, '<br /><br />'));
     $result['totalKeys'] = $cnt;
     $result['title'] = $module->getTitle();
     $result['author'] = $module->getAuthorName();
     return $result;
 }
 public static function getData($id)
 {
     global $lC_Database, $lC_Language, $lC_Vqmod;
     $result = array();
     include $lC_Vqmod->modCheck('includes/modules/order_total/' . $id . '.php');
     $lC_Language->injectDefinitions('modules/order_total/' . $id . '.xml');
     $module = 'lC_OrderTotal_' . $id;
     $module = new $module();
     $cnt = 0;
     $keys = '';
     foreach ($module->getKeys() as $key) {
         $Qkey = $lC_Database->query('select configuration_title, configuration_value, configuration_description, use_function, set_function from :table_configuration where configuration_key = :configuration_key');
         $Qkey->bindTable(':table_configuration', TABLE_CONFIGURATION);
         $Qkey->bindValue(':configuration_key', $key);
         $Qkey->execute();
         $keys .= '<label for="' . $Qkey->value('configuration_title') . '" class="label"><strong>' . $Qkey->value('configuration_title') . '</strong>&nbsp;<span class="icon-info-round icon-blue with-tooltip with-small-padding" style="cursor:pointer;" title="' . $Qkey->value('configuration_description') . '" data-tooltip-options=\'{"classes":["anthracite-gradient"]}\'></span>';
         if (!lc_empty($Qkey->value('set_function'))) {
             $keys .= lc_call_user_func($Qkey->value('set_function'), $Qkey->value('configuration_value'), $key);
         } else {
             $keys .= lc_draw_input_field('configuration[' . $key . ']', $Qkey->value('configuration_value'), 'class="input full-width"');
         }
         $keys .= '</label><br /><br />';
         $cnt++;
     }
     $result['keys'] = substr($keys, 0, strrpos($keys, '<br /><br />'));
     $result['totalKeys'] = $cnt;
     return $result;
 }
Example #3
0
 public static function getData($id)
 {
     global $lC_Database, $lC_Vqmod;
     include $lC_Vqmod->modCheck('includes/modules/services/' . $_GET['module'] . '.php');
     $module = 'lC_Services_' . $_GET['module'] . '_Admin';
     $module = new $module();
     $cnt = 0;
     $keys = '';
     $result = array();
     foreach ($module->keys() as $key) {
         $Qkey = $lC_Database->query('select configuration_title, configuration_value, configuration_description, use_function, set_function from :table_configuration where configuration_key = :configuration_key');
         $Qkey->bindTable(':table_configuration', TABLE_CONFIGURATION);
         $Qkey->bindValue(':configuration_key', $key);
         $Qkey->execute();
         $keys .= '<label for="' . $Qkey->value('configuration_title') . '" class="label"><strong>' . $Qkey->value('configuration_title') . '</strong></label>';
         if (!lc_empty($Qkey->value('set_function'))) {
             $keys .= lc_call_user_func($Qkey->value('set_function'), $Qkey->value('configuration_value'), $key);
         } else {
             $keys .= lc_draw_input_field('configuration[' . $key . ']', $Qkey->value('configuration_value'), 'class="input" onfocus="this.select();" style="width:28%;"');
         }
         $keys .= '<span class="margin-left">' . lc_show_info_bubble($Qkey->value('configuration_description'), null, 'on-left grey') . '</span><br /><br />';
         $cnt++;
     }
     $result['keys'] = substr($keys, 0, strrpos($keys, '<br /><br />'));
     $result['totalKeys'] = $cnt;
     $result['title'] = $module->title;
     return $result;
 }
Example #4
0
 public static function getData($id)
 {
     global $lC_Database, $lC_Language, $lC_Vqmod;
     include $lC_Vqmod->modCheck('includes/templates/' . $id . '.php');
     $module = 'lC_Template_' . $id;
     $module = new $module();
     $cnt = 0;
     $keys = '';
     $result = array();
     foreach ($module->getKeys() as $key => $value) {
         $keys .= '<b>' . $value['title'] . '</b><br />' . $value['description'] . '<br />';
         if (!empty($value['set_function'])) {
             $keys .= lc_call_user_func($value['set_function'], $value['value'], $key);
         } else {
             $keys .= lc_draw_input_field('configuration[' . $key . ']', $value['value']);
         }
         $keys .= '<br /><br />';
         $cnt++;
     }
     $keys = substr($keys, 0, strrpos($keys, '<br /><br />'));
     $result['keys'] = substr($keys, 0, strrpos($keys, '<br /><br />'));
     $result['totalKeys'] = $cnt;
     $result['title'] = $module->getTitle();
     $result['code'] = $module->getCode();
     $result['author'] = $module->getAuthorName() . ' (' . $module->getAuthorAddress() . ')';
     $result['markup'] = $module->getMarkup();
     $result['css_based'] = $module->isCSSBased() ? 'Yes' : 'No';
     $result['screenshot'] = $module->getScreenshot();
     $result['medium'] = $module->getMedium();
     return $result;
 }
Example #5
0
 public static function getFormData($id = null)
 {
     $result = array();
     $result['cData'] = array();
     if (isset($id) && $id != null) {
         $result['cData'] = lC_Configuration_Admin::getData($id);
         if (!lc_empty($result['cData']['set_function'])) {
             if ($result['cData']['configuration_key'] == 'STORE_ZONE') {
                 if (lc_store_country_has_zones() == 1) {
                     $result['valueField'] = lc_call_user_func($result['cData']['set_function'], $result['cData']['configuration_value'], $result['cData']['configuration_key']);
                 } else {
                     $result['valueField'] = lc_draw_input_field('configuration[' . $result['cData']['configuration_key'] . ']', $result['cData']['configuration_value'], 'style="width:96%"');
                 }
             } else {
                 $result['valueField'] = lc_call_user_func($result['cData']['set_function'], $result['cData']['configuration_value'], $result['cData']['configuration_key']);
             }
         } else {
             $result['valueField'] = lc_draw_input_field('configuration[' . $result['cData']['configuration_key'] . ']', $result['cData']['configuration_value'], 'style="width:96%"');
         }
     }
     return $result;
 }
Example #6
0
 public static function getData($name)
 {
     global $lC_Database, $lC_Language, $lC_Vqmod, $lC_Currencies;
     $result = array();
     include_once DIR_FS_CATALOG . 'addons/' . $name . '/controller.php';
     $addon = new $name();
     $blurb = $addon->getAddonBlurb() ? $addon->getAddonBlurb() : null;
     $result['desc'] = '<div class="margin-bottom" style="width:100%;">
                    <div class="float-left margin-right">' . $addon->getAddonThumbnail() . '</div>
                      <div style="width:90%;">
                        <div class="strong">' . $addon->getAddonTitle() . '</div>
                        <div>' . lc_image('../images/stars_' . $addon->getAddonRating() . '.png', sprintf($lC_Language->get('rating_from_5_stars'), $addon->getAddonRating()), null, null, 'class="mid-margin-top small-margin-bottom"') . '</div>
                        <div><small>' . $addon->getAddonAuthor() . '</small></div>
                        <div style="position:absolute; right:0; top:0;"><button id="uninstallButton" onclick="uninstallAddon(\'' . $addon->getAddonCode() . '\',\'' . urlencode($addon->getAddonTitle()) . '\', \'' . $addon->getAddonType() . '\');" class="button icon-undo red-gradient glossy"><span>Uninstall</span></button></div>
                       </div>
                     </div>' . $blurb . '
                   </div>';
     $cnt = 0;
     $keys = '';
     foreach ($addon->getKeys() as $key) {
         $Qkey = $lC_Database->query('select configuration_title, configuration_value, configuration_description, use_function, set_function from :table_configuration where configuration_key = :configuration_key');
         $Qkey->bindTable(':table_configuration', TABLE_CONFIGURATION);
         $Qkey->bindValue(':configuration_key', $key);
         $Qkey->execute();
         $keys .= '<label for="' . $Qkey->value('configuration_title') . '" class="label"><strong>' . $Qkey->value('configuration_title') . '</strong></label>';
         if (!lc_empty($Qkey->value('set_function'))) {
             $keys .= lc_call_user_func($Qkey->value('set_function'), $Qkey->value('configuration_value'), $key);
         } else {
             if (stristr($key, 'password')) {
                 $keys .= lc_draw_password_field('configuration[' . $key . ']', 'class="input" onfocus="this.select();"', $Qkey->value('configuration_value'));
             } else {
                 if (preg_match('/(_COST|_HANDLING|_PRICE|_FEE|_MINIMUM_ORDER)$/i', $key)) {
                     $keys .= '<div class="inputs" style="display:inline; padding:8px 0;">' . '  <span class="mid-margin-left no-margin-right">' . $lC_Currencies->getSymbolLeft() . '</span>' . lc_draw_input_field('configuration[' . $key . ']', @number_format($Qkey->value('configuration_value'), DECIMAL_PLACES), 'class="input-unstyled" onfocus="this.select();"') . '</div>';
                 } else {
                     $keys .= lc_draw_input_field('configuration[' . $key . ']', $Qkey->value('configuration_value'), 'class="input" onfocus="this.select();"');
                 }
             }
         }
         $keys .= '<span class="info-spot on-left margin-left"><span class="icon-info-round icon-silver"></span><span class="info-bubble">' . $Qkey->value('configuration_description') . '</span></span><br /><br />';
         $cnt++;
     }
     $result['keys'] = substr($keys, 0, strrpos($keys, '<br /><br />'));
     $result['totalKeys'] = $cnt;
     return $result;
 }