the Free Software Foundation, either version 2 of the License, or (at your option) any later version. PlatesGenerator is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with PlatesGenerator. If not, see <http://www.gnu.org/licenses/>. */ include_once '../../../wp-config.php'; include_once '../../../wp-load.php'; include_once '../../../wp-includes/wp-db.php'; global $wpdb; $options = UPlatesGenerator::getParams(); ?> <script> var pg_your_reg_here = '<?php _e('YOUR REG HERE', 'platesgenerator'); ?> '; var pg_your_slogan = '<?php _e('YOUR SLOGAN', 'platesgenerator'); ?> '; var pg_currency_symbol = '<?php echo $options['platesgenerator_currency_symbol']; ?> '; var pg_money_format = '<?php
public function pg_payments_page() { $options = UPlatesGenerator::getParams(); if ($_POST['buy_config_option'] === 'save') { ?> <div id="setting-error-settings_updated" class="updated settings-error"> <p><strong>Settings saved.</strong></p> </div> <?php $options['platesgenerator_success_message'] = mysql_escape_string($_POST['platesgenerator_success_message']); $options['platesgenerator_tel_adr'] = mysql_escape_string($_POST['platesgenerator_tel_adr']); $options['platesgenerator_currency_symbol'] = mysql_escape_string($_POST['platesgenerator_currency_symbol']); $options['platesgenerator_money_format'] = mysql_escape_string($_POST['platesgenerator_money_format']); foreach ($options as $key => $value) { update_option($key, $value); } } unset($key, $value); if ($options['platesgenerator_tel_adr'] === 'checked') { $checked1 = 'checked="checked"'; $checked2 = ''; } else { $checked1 = ''; $checked2 = 'checked="checked"'; } $title = 'Payment Settings'; $output .= ' <div class="wrap"> <div id="poststuff" class="metabox-holder has-right-sidebar">'; $output .= pg_sidebar(); $output .= ' <div id="post-body"> <div id="post-body-content">'; $output .= '<div id="att-wrapper">'; $output .= '<form action="" method="post" enctype="multipart/form-data" id="form_formdata">'; $output .= '<div class="att-hgroup" style="background:#' . atatari_background() . ';">'; $output .= '<input type="submit" name="submit" value="Save Changes" class="att-popup-save" />'; $output .= '</div>'; $output .= '<div class="att-strip"></div>'; // sections ------------------------------------------------- $output .= '<div class="att-sections">'; $output .= '<div id="general-att-section" class="att-section" style="display: block;"> <h3>' . $title . '</h3> <input type="hidden" name="buy_config_option" value="save" /> <table class="form-table"> <tbody>'; $output .= '<tr style="border:0px;"> <th scope="row" colspan="2" style=""> <span class="description">Currently, PlatesGenerator does not allow to accept money on your website, but it allows to receive orders via email.</span> </th> </tr> <tr> <th scope="row"> Currency Symbol<span class="description"></span> </th> <td> <input type="text" name="platesgenerator_currency_symbol" value="' . $options['platesgenerator_currency_symbol'] . '" class="small-text" /> <span class="description small-text">$, €, £, etc.</span> </td> </tr> <tr> <th scope="row"> Money Format<span class="description"></span> </th> <td> <input type="text" name="platesgenerator_money_format" value="' . $options['platesgenerator_money_format'] . '" /> <span class="description small-text">Supported variables: [CURRENCY_SYMBOL], [VALUE]</span> </td> </tr> <tr style="border:0px;"> <th scope="row"> Success message<span class="description">Shown on successful order submission.</span> </th> <td> <input name="platesgenerator_success_message" type="text" value="' . $options['platesgenerator_success_message'] . '"/> </td> </tr> <tr style="border:0px;"> <th scope="row"> Request Phone Number and Address <span class="description"></span> </th> <td>'; $output .= ' <fieldset class="buttonset"> <input type="radio" id="responsive_0" name="platesgenerator_tel_adr" value="checked" ' . $checked1 . '/> <label for="responsive_0">On</label> <input type="radio" id="responsive_1" name="platesgenerator_tel_adr" value="" ' . $checked2 . '/> <label for="responsive_1">Off</label> </fieldset> <span class="description btn-desc"> <b>Notice:</b> If you set this to "On", it will require customers to fill out the phone/address fields on the order form. </span> </td> </tr> </tbody> </table> '; $output .= '<div class="att-sections-footer">'; $output .= '<input type="hidden" id="form_action" name="action" value="save_main_options" />'; $output .= '<input type="submit" name="submit" value="Save Changes" class="att-popup-save" />'; $output .= '</div>'; $output .= '</div>'; $output .= '</div>'; $output .= '</form>'; $output .= '</div>'; $output .= '</div>'; $output .= '</div>'; $output .= '</div>'; echo $output; }