Beispiel #1
0
 /**
  * Register widget with WordPress.
  */
 public function __construct()
 {
     global $xdark;
     $this->framework = $xdark;
     $this->options['description'] = $this->framework->__($this->options['description']);
     parent::__construct($this->framework->__($this->slug), $this->framework->__($this->name), $this->options, $this->controlOptions);
 }
Beispiel #2
0
 public function __construct()
 {
     $this->framework = framework::getInstance();
     $this->setRouter($this->framework->getRouter());
     $this->segments = $this->getRouter()->getSegments();
     $this->parameters = $this->getRouter()->getParameters();
 }
Beispiel #3
0
 public function set($name, $value)
 {
     $sql = "SELECT * FROM settings WHERE name=?";
     if ($stmt = parent::get('db')->mysqli()->prepare($sql)) {
         $stmt->bind_param('s', $name);
         $stmt->execute();
         $stmt->store_result();
         if ($stmt->num_rows > 0) {
             $sql = "UPDATE settings SET value=? WHERE name=?";
         } else {
             $sql = "INSERT INTO settings(value, name) VALUES(?, ?)";
         }
     }
     if (isset($sql)) {
         if ($stmt = parent::get('db')->mysqli()->prepare($sql)) {
             $stmt->bind_param('ss', $value, $name);
             $stmt->execute();
             $stmt->store_result();
             if ($stmt->affected_rows > 0) {
                 return true;
             }
         }
     }
     return false;
 }
 public function __construct($instance)
 {
     parent::__construct($instance);
     // todo calling these to instatiate the classes
     $this->©db->prefix;
     $this->©db_table->tableName();
 }
Beispiel #5
0
 /**
  * Constructor.
  *
  * @param object|array $instance Required at all times.
  *    A parent object instance, which contains the parent's `$instance`,
  *    or a new `$instance` array.
  */
 public function __construct($instance)
 {
     parent::__construct($instance);
     $this->import_json_form_field_config = array('type' => 'file', 'required' => true, 'name' => $this->©action->input_name_for_call_arg(1), 'validation_patterns' => array(array('name' => 'json_file', 'description' => 'A valid `.json` file.', 'minimum' => 1, 'maximum' => 10485760, 'min_max_type' => 'file_size', 'regex' => '/\\.json$/i')), 'move_to_dir' => $this->©dir->temp());
     $defaults = array('encryption.key' => '', 'support.url' => 'mailto:' . get_bloginfo('admin_email'), 'no_cache.headers.always' => '0', 'styles.front_side.load_by_default' => '0', 'styles.front_side.load_themes' => array(), 'styles.front_side.theme' => 'yeti', 'scripts.front_side.load_by_default' => '0', 'crons.config' => array(), 'menu_pages.theme' => 'yeti', 'menu_pages.panels.order' => array(), 'menu_pages.panels.state' => array(), 'ips.prioritize_remote_addr' => '0', 'captchas.google.public_key' => '6LeCANsSAAAAAIIrlB3FrXe42mr0OSSZpT0pkpFK', 'captchas.google.private_key' => '6LeCANsSAAAAAGBXMIKAirv6G4PmaGa-ORxdD-oZ', 'url_shortener.default_built_in_api' => 'goo_gl', 'url_shortener.custom_url_api' => '', 'url_shortener.api_keys.goo_gl' => '', 'templates.stand_alone.styles' => '<style type="text/css">' . "\n\n" . '</style>', 'templates.stand_alone.scripts' => '<script type="text/javascript">' . "\n\n" . '</script>', 'templates.stand_alone.bg_style' => 'background: #F2F1F0 url(\'' . $this->©string->esc_sq($this->©url->to_template_dir_file('client-side/images/stand-alone-bg.png')) . '\') repeat left top;', 'templates.stand_alone.header' => '<a href="' . esc_attr($this->©url->to_wp_home_uri()) . '"><img class="logo" src="' . esc_attr($this->©url->to_template_dir_file('client-side/images/stand-alone-logo.png')) . '" alt="" /></a>', 'templates.stand_alone.footer' => '', 'templates.email.header' => '', 'templates.email.footer' => '', 'users.registration.display_name_format' => 'first_name', 'mail.smtp' => '0', 'mail.smtp.force_from' => '0', 'mail.smtp.from_name' => get_bloginfo('name'), 'mail.smtp.from_addr' => get_bloginfo('admin_email'), 'mail.smtp.host' => '', 'mail.smtp.port' => '0', 'mail.smtp.secure' => '', 'mail.smtp.username' => '', 'mail.smtp.password' => '', 'plugin_site.username' => '', 'plugin_site.password' => '', 'menu_pages.panels.email_updates.action_url' => 'http://websharks-inc.us1.list-manage.com/subscribe/post?u=8f347da54d66b5298d13237d9&id=65240782e2', 'menu_pages.panels.community_forum.feed_url' => 'http://wordpress.org/support/rss', 'menu_pages.panels.news_kb.feed_url' => 'http://make.wordpress.org/core/feed/', 'menu_pages.panels.videos.yt_playlist' => 'PLBmUTJGsRqNKM--kwBeKJY9wOT-n7OhnC', 'packages.active' => array(), 'log' => array(), 'edd.update' => 0, 'edd.store_url' => '', 'edd_license' => '', 'edd.license.status' => 0, 'edd.demo' => 0, 'edd.demo_start' => 0, 'edd.demo_duration' => 604800);
     $validators = array('encryption.key' => array('string:!empty'), 'support.url' => array('string:!empty'), 'no_cache.headers.always' => array('string:numeric >=' => 0), 'styles.front_side.load_by_default' => array('string:numeric >=' => 0), 'styles.front_side.load_themes' => array('array'), 'styles.front_side.theme' => array('string:!empty'), 'scripts.front_side.load_by_default' => array('string:numeric >=' => 0), 'crons.config' => array('array:!empty'), 'menu_pages.theme' => array('string:!empty'), 'menu_pages.panels.order' => array('array:!empty'), 'menu_pages.panels.state' => array('array:!empty'), 'ips.prioritize_remote_addr' => array('string:numeric >=' => 0), 'captchas.google.public_key' => array('string:!empty'), 'captchas.google.private_key' => array('string:!empty'), 'url_shortener.default_built_in_api' => array('string:in_array' => array('tiny_url', 'goo_gl')), 'url_shortener.custom_url_api' => array('string:preg_match' => '/^https?\\:/i'), 'url_shortener.api_keys.goo_gl' => array('string:!empty'), 'templates.stand_alone.styles' => array('string'), 'templates.stand_alone.scripts' => array('string'), 'templates.stand_alone.bg_style' => array('string'), 'templates.stand_alone.header' => array('string'), 'templates.stand_alone.footer' => array('string'), 'templates.email.header' => array('string'), 'templates.email.footer' => array('string'), 'users.registration.display_name_format' => array('string:!empty'), 'mail.smtp' => array('string:numeric >=' => 0), 'mail.smtp.force_from' => array('string:numeric >=' => 0), 'mail.smtp.from_name' => array('string:!empty'), 'mail.smtp.from_addr' => array('string:!empty'), 'mail.smtp.host' => array('string:!empty'), 'mail.smtp.port' => array('string:numeric >=' => 1), 'mail.smtp.secure' => array('string:in_array' => array('ssl', 'tls')), 'mail.smtp.username' => array('string:!empty'), 'mail.smtp.password' => array('string:!empty'), 'plugin_site.username' => array('string:!empty'), 'plugin_site.password' => array('string:!empty'), 'menu_pages.panels.email_updates.action_url' => array('string:!empty'), 'menu_pages.panels.community_forum.feed_url' => array('string:!empty'), 'menu_pages.panels.news_kb.feed_url' => array('string:!empty'), 'menu_pages.panels.videos.yt_playlist' => array('string:!empty'), 'packages.active' => array('array'), 'log' => array('array'), 'edd.update' => array('string:numeric >=' => 0, 'string:numeric <=' => 1), 'edd.store_url' => array('string'), 'edd_license' => array('string'), 'edd.license.status' => array('string:numeric >=' => 0, 'string:numeric <=' => 1), 'edd.demo' => array('string:numeric >=' => 0, 'string:numeric <=' => 1), 'edd.demo_start' => array('string:numeric >=' => 0), 'edd.demo_duration' => array('string:numeric >=' => 0));
     $this->setup($defaults, $validators);
 }
Beispiel #6
0
 /**
  * @param array|\xd_v141226_dev\framework $instance
  * @param int                             $posts_to_display
  * @param int                             $offset
  * @param string                          $rate_by
  * @param string                          $sort_by
  * @param float                           $entropy
  *
  * @throws \exception
  */
 public function __construct($instance, $posts_to_display = 6, $offset = 0, $rate_by = 'c', $sort_by = 'ddrd', $entropy = 0.0)
 {
     parent::__construct($instance);
     $this->defaults = array('posts_to_display' => 6, 'offset' => 0, 'sort_by' => 'ddrd', 'entropy' => 0.0, 'rate_by' => 'c');
     $this->posts_to_display = (int) $posts_to_display;
     $this->offset = (int) $offset;
     $this->sort_by = esc_sql($sort_by);
     $this->entropy = (double) $entropy;
     $this->rate_by = esc_sql($rate_by);
 }
Beispiel #7
0
 public function getStatuses()
 {
     $sql = "SELECT id, status, description FROM statuses";
     $query = parent::get('db')->mysqli()->query($sql);
     $result = array();
     while ($row = $query->fetch_array()) {
         $result[] = $row;
     }
     return $result;
 }
Beispiel #8
0
 public function addStatus($TypeName, $TypeDescription)
 {
     $sql = "INSERT INTO tickettypes(name, description) VALUES('" . $TypeName . "', '" . $TypeDescription . "')";
     $query = parent::get('db')->mysqli()->query($sql);
     if ($query) {
         return 0;
     } else {
         return 1;
     }
 }
Beispiel #9
0
 /**
  * Constructor.
  *
  * @param object|array $instance Required at all times.
  *    A parent object instance, which contains the parent's `$instance`,
  *    or a new `$instance` array.
  *
  * @throws exception If this class is instantiated before the `init` action hook.
  */
 public function __construct($instance)
 {
     parent::__construct($instance);
     if (!did_action('init')) {
         throw $this->©exception($this->method(__FUNCTION__) . '#init', NULL, $this->__('Doing it wrong (the `init` hook has NOT been fired yet).'));
     }
     $scripts_to_register = array();
     // Initialize scripts.
     // Core libs; available in all contexts.
     if (!wp_script_is($this->instance->core_ns_with_dashes, 'registered')) {
         $scripts_to_register[$this->instance->core_ns_with_dashes] = array('deps' => array('jquery'), 'url' => $this->©url->to_core_dir_file('/client-side/scripts/core-libs.min.js'), 'ver' => $this->instance->core_version_with_dashes, 'localize' => array('instance__failure' => $this->__('Could NOT get instance config value for key: `%1$s`.'), 'verifier__failure' => $this->__('Could NOT get verifier for key: `%1$s`.'), '____failure' => $this->__('Could NOT get translation string for key: `%1$s`.'), 'core_only_failure' => $this->__('Only the core may call upon: `%1$s`.'), 'view_source__doc_title' => $this->_x('Source'), 'win_open__turn_off_popup_blockers' => $this->_x('Please turn off all popup blockers and try again.'), 'ajax__invalid_type' => $this->__('Invalid `type`. Expecting `$$.___public_type|$$.___protected_type|$$.___private_type`.'), 'check_arg_types__empty' => $this->__('empty'), 'check_arg_types__caller' => $this->__('caller'), 'validate_form__required_field' => $this->_x('This is a required field.'), 'validate_form__mismatch_fields' => $this->_x('Mismatch (please check these fields).'), 'validate_form__unique_field' => $this->_x('Please try again (this value MUST be unique please).'), 'validate_form__required_select_at_least_one' => $this->_x('Please select at least 1 option.'), 'validate_form__required_select_at_least' => $this->_x('Please select at least %1$s options.'), 'validate_form__required_file' => $this->_x('A file MUST be selected please.'), 'validate_form__required_file_at_least_one' => $this->_x('Please select at least one file.'), 'validate_form__required_file_at_least' => $this->_x('Please select at least %1$s files.'), 'validate_form__required_radio' => $this->_x('Please choose one of the available options.'), 'validate_form__required_checkbox' => $this->_x('This box MUST be checked please.'), 'validate_form__required_check_at_least_one' => $this->_x('Please check at least one box.'), 'validate_form__required_check_at_least' => $this->_x('Please check at least %1$s boxes.'), 'validate_form__validation_description_prefix' => $this->_x('<strong>REQUIRES:</strong>'), 'validate_form__or_validation_description_prefix' => $this->_x('<strong>OR:</strong>'), 'validate_form__check_issues_below' => $this->_x('<strong>ERROR:</strong> please check the issues below.'), 'check_arg_types__diff_object_type' => $this->__('[a different object type]'), 'check_arg_types__missing_args' => $this->__('Missing required argument(s); `%1$s` requires `%2$s`, `%3$s` given.'), 'check_arg_types__invalid_arg' => $this->__('Argument #%1$s passed to `%2$s` requires `%3$s`, %4$s`%5$s` given.'), 'password_strength_status__empty' => $this->_x('password strength indicator'), 'password_strength_status__short' => $this->_x('too short (6 character minimum)'), 'password_strength_status__weak' => $this->_x('weak (mix caSe, numbers & symbols)'), 'password_strength_status__good' => $this->_x('good (reasonably strong)'), 'password_strength_status__strong' => $this->_x('very strong'), 'password_strength_status__mismatch' => $this->_x('mismatch')));
     }
     // Front-side components; available in all contexts.
     $this->front_side_components = $this->front_side_components();
     if ($front_side_file = $this->©file->template('/client-side/scripts/front-side.min.js', TRUE)) {
         $this->front_side_components[] = $this->instance->plugin_root_ns_with_dashes . '--front-side';
         $scripts_to_register[$this->instance->plugin_root_ns_with_dashes . '--front-side'] = array('deps' => array($this->instance->core_ns_with_dashes), 'url' => $this->©url->to_wp_abs_dir_file($front_side_file), 'ver' => $this->instance->plugin_version_with_dashes);
     } else {
         $this->front_side_components = array_merge($this->front_side_components, array($this->instance->core_ns_with_dashes));
     }
     // Stand-alone components; available in all contexts (depends on front-side).
     $this->stand_alone_components = $this->stand_alone_components();
     if ($stand_alone_file = $this->©file->template('client-side/scripts/stand-alone.min.js', TRUE)) {
         $this->stand_alone_components[] = $this->instance->plugin_root_ns_with_dashes . '--stand-alone';
         $scripts_to_register[$this->instance->plugin_root_ns_with_dashes . '--stand-alone'] = array('deps' => $this->front_side_components, 'url' => $this->©url->to_wp_abs_dir_file($stand_alone_file), 'ver' => $this->instance->plugin_version_with_dashes);
     } else {
         $this->stand_alone_components = array_merge($this->stand_alone_components, $this->front_side_components);
     }
     // Menu page components; only if applicable.
     if ($is_plugin_page = $this->©menu_page->is_plugin_page()) {
         $this->menu_page_components = $this->menu_page_components();
         $this->menu_page_components[] = $this->instance->core_ns_with_dashes . '--menu-pages';
         if (!wp_script_is($this->instance->core_ns_with_dashes . '--menu-pages', 'registered')) {
             $scripts_to_register[$this->instance->core_ns_with_dashes . '--menu-pages'] = array('deps' => array($this->instance->core_ns_with_dashes), 'url' => $this->©url->to_core_dir_file('/client-side/scripts/menu-pages/menu-pages.min.js'), 'ver' => $this->instance->core_version_with_dashes);
         }
     }
     if ($scripts_to_register) {
         $this->register($scripts_to_register);
     }
     // Add data separately, as this might change for each plugin the core processes.
     $this->add_data($this->instance->core_ns_with_dashes, $this->_build_plugin_root_namespaces_for_core_inline_data());
     $this->add_data($this->instance->core_ns_with_dashes, $this->_build_instance_for_core_inline_data());
     $this->add_data($this->instance->core_ns_with_dashes, $this->_build_verifiers_for_core_inline_data());
     if (in_array($this->instance->plugin_root_ns_with_dashes . '--front-side', $this->front_side_components, TRUE)) {
         $this->add_data($this->instance->plugin_root_ns_with_dashes . '--front-side', $this->build_front_side_inline_data());
     }
     if (in_array($this->instance->plugin_root_ns_with_dashes . '--stand-alone', $this->stand_alone_components, TRUE)) {
         $this->add_data($this->instance->plugin_root_ns_with_dashes . '--stand-alone', $this->build_stand_alone_inline_data());
     }
     if ($is_plugin_page) {
         $this->add_data($this->instance->core_ns_with_dashes . '--menu-pages', $this->build_menu_page_inline_data());
     }
 }
Beispiel #10
0
 /**
  * Constructor.
  *
  * @param object|array $instance Required at all times.
  *    A parent object instance, which contains the parent's `$instance`,
  *    or a new `$instance` array.
  *
  * @throws exception If GMP extension is not loaded up.
  */
 public function __construct($instance)
 {
     parent::__construct($instance);
     if (!extension_loaded('gmp')) {
         throw $this->©exception($this->method(__FUNCTION__), get_defined_vars(), $this->__('GMP extension NOT loaded or unavailable.'));
     }
     $this->_0 = $this->resource($this->_0);
     // Converts to resource.
     $this->_1 = $this->resource($this->_1);
     // Converts to resource.
     $this->_2 = $this->resource($this->_2);
     // Converts to resource.
 }
Beispiel #11
0
 /**
  * Constructor.
  *
  * @param object|array $instance Required at all times.
  *    A parent object instance, which contains the parent's `$instance`,
  *    or a new `$instance` array.
  *
  * @throws exception If invalid types are passed through arguments list.
  */
 public function __construct($instance)
 {
     parent::__construct($instance);
     // Construct instance.
     $this->option = $this->instance->plugin_root_ns_stub . '__db_cache';
     if (!is_array($this->cache = get_option($this->option))) {
         delete_option($this->option);
         // Delete & recreate.
         add_option($this->option, $this->cache = array(), '', 'no');
         // We do NOT want to autoload this option value, because that requires twice the memory.
         // If we allowed WordPress® to autoload this, it would also be stored into a cache by WordPress® under `alloptions`.
     }
 }
Beispiel #12
0
 public function get_creds()
 {
     $rng_num = parent::get('settings')->get('rng_num');
     $rng_pss = parent::get('settings')->get('rng_pss');
     $rng_frm = parent::get('settings')->get('rng_frm');
     // Until the settings are working, these will be manually set
     $rng_num = "18666112601";
     $rng_pss = "26272627";
     $rng_frm = "3309292600";
     if (empty($rng_num) || empty($rng_pss) || empty($rng_frm)) {
         return false;
     }
     return array('rng_num' => $rng_num, 'rng_pss' => $rng_pss, 'rng_frm' => $rng_frm);
 }
Beispiel #13
0
 public function setComment($invoice_id, $comment, $date, $user_id)
 {
     $sql = "INSERT INTO comments (invoice_id, comment, dateadded, user_id)\n\t\tVALUES(?, ?, ?, ?)";
     if ($stmt = parent::get('db')->mysqli()->prepare($sql)) {
         $stmt->bind_param('issi', $invoice_id, $comment, $date, $user_id);
         $stmt->execute();
         $stmt->store_result();
         if ($stmt->affected_rows > 0) {
             return parent::get('db')->mysqli()->insert_id;
         }
         return false;
     }
     return false;
 }
Beispiel #14
0
 /**
  * Constructor.
  *
  * @param object|array $instance Required at all times.
  *    A parent object instance, which contains the parent's `$instance`,
  *    or a new `$instance` array.
  *
  * @throws exception If a request contains an expired action key.
  */
 public function __construct($instance)
 {
     parent::__construct($instance);
     $_r = $this->©vars->_REQUEST(NULL, TRUE);
     // REQUEST (including files).
     if ($this->©array->is_not_empty($_r[$this->instance->plugin_var_ns]['a'])) {
         $this->action = $_r[$this->instance->plugin_var_ns]['a'];
     } else {
         if ($this->©string->is_not_empty($_r[$this->instance->plugin_var_ns . '_action'])) {
             if (strpos($_r[$this->instance->plugin_var_ns . '_action'], '.key.') !== FALSE) {
                 $action_key = $_r[$this->instance->plugin_var_ns . '_action'];
                 $action = $this->©db_utils->get_transient($action_key);
                 if (!$this->©array->is_not_empty($action)) {
                     throw $this->©exception($this->method(__FUNCTION__) . '#invalid_or_expired_action_key', get_defined_vars(), sprintf($this->__('Invalid or expired action key: `%1$s`.'), $action_key));
                 }
                 $this->action = $action;
                 // Define action property.
             } else {
                 // Treat the `action` as a slug (we construct an array from this).
                 $this->action = array('s' => $_r[$this->instance->plugin_var_ns . '_action']);
             }
         }
     }
 }
 /**
  * Constructor.
  *
  * @param object|array $instance Required at all times.
  *    A parent object instance, which contains the parent's `$instance`,
  *    or a new `$instance` array.
  *
  * @param array        $properties Optional array of properties to set upon construction.
  *
  * @throws exception If invalid types are passed through arguments list.
  */
 public function __construct($instance, $properties = array())
 {
     parent::__construct($instance);
     $this->check_arg_types('', 'array', func_get_args());
     if ($properties) {
         $this->set_properties($properties);
     }
     $this->defaults['name_prefix'] = $this->name_prefix;
     $this->defaults['id_prefix'] = $this->id_prefix;
     $this->defaults['use_update_marker'] = $this->use_update_markers;
     if ($this->for_call) {
         // For a specific call action?
         $this->is_action_for_call = $this->©action->is_call($this->for_call);
     }
     $this->spl_object_hash = spl_object_hash($this);
 }
<?php

session_start();
date_default_timezone_set('EST');
include 'framework.php';
$fw = new framework();
$status = $fw->clean_input($_POST['status']);
$scale_id = $fw->clean_input($_POST['scale_id']);
$fullname = $_SESSION['val_fullname'];
$username = $_SESSION['val_username'];
#echo $status . "<br>";
#echo $scale_id . "<br>";
#echo $fullname . "<br>";
#echo $username . "<br>";
#echo $_SESSION['val_username'];
@($db = new mysqli('localhost', 'root', '', 'brechbuhler'));
if (mysqli_connect_error()) {
    $errnum = mysqli_connect_errno();
    echo "Error({$errnum}): Could not connect to database. Please try again later.";
    exit;
}
#Check if the user is actually an admin
$query_user = "******";
#echo $query_user;
$result_user = $db->query($query_user);
if ($result_user) {
    while ($row = $result_user->fetch_assoc()) {
        $db_pass = $row['password'];
        $db_user = $row['username'];
        $db_name = $row['fullname'];
        $db_email = $row['email'];
Beispiel #17
0
    public function generateListDisplay($tickets)
    {
        $result = '
			<table class="table">
				<thead>
					<tr>
						<th>Status</th>
						<th>Repair</th>
						<th>Invoice</th>
						<th>Customer</th>
						<th>Call</th>
					</tr>
				</thead>
				<tbody>';
        foreach ($tickets as $key => $ticket) {
            switch ($ticket['status.status']) {
                case "Pending Payment":
                    $btn_atr = 'badge-success';
                    $btn_char = ' icon-money">';
                    break;
                case "Call Customer Admin":
                case "Call Customer Tech":
                    $btn_atr = 'badge-warning';
                    $btn_char = ' icon-phone">';
                    break;
                case "In Progress":
                    $btn_atr = '';
                    $btn_char = ' icon-stethoscope">';
                    break;
                case "Parts need to be ordered":
                    $btn_atr = 'badge-info';
                    $btn_char = ' icon-shopping-cart">';
                    break;
                case "Post Payment":
                    $btn_atr = 'badge-important';
                    $btn_char = ' icon-bolt">';
                    break;
                case "Waiting for Parts":
                    $btn_atr = 'badge-info';
                    $btn_char = ' icon-time">';
                    break;
                case "Closed":
                    $btn_atr = 'badge-inverse';
                    $btn_char = ' icon-lock">';
                    break;
                default:
                    $btn_atr = '';
                    $btn_char = ' icon-hand-right">';
                    break;
            }
            $result .= '<tr><td><a href="#" rel="tooltip" placement="left" title="';
            $result .= $ticket['status.status'];
            $result .= '"><span class="badge ' . $btn_atr . '">';
            $result .= '<em class="icon-white';
            $result .= $btn_char . '</em></span></a></td>';
            $result .= '<td><a href="#" rel="tooltip" placement="left" title="';
            $result .= $ticket['status.status'];
            $result .= '"><span class="badge badge-inverse">';
            $result .= '<em class="icon-';
            switch ($ticket['ticket.repair']) {
                case 1:
                    $result .= 'desktop">&nbsp;Desktop/PC';
                    break;
                case 2:
                    $result .= 'laptop">&nbsp;Laptop';
                    break;
                case 3:
                    $result .= 'tablet">&nbsp;iPad';
                    break;
                case 4:
                    $result .= 'mobile-phone">&nbsp;iPhone';
                    break;
                case 5:
                    $result .= 'keyboard">&nbsp;Coding';
                    break;
                case 6:
                    $result .= 'sitemap">&nbsp;Networking';
                    break;
                case 7:
                    $result .= 'gamepad">&nbsp;Nintendo DS/DSi/3DS/XL';
                    break;
                case 8:
                    $result .= 'linux">&nbsp;Web Hosting';
                    break;
                case 9:
                    $result .= 'folder-open-alt">&nbsp;Data Recovery';
                    break;
                case 10:
                    $result .= 'gift">&nbsp;eBay';
                    break;
                case 11:
                    $result .= 'mobile-phone">&nbsp;iPod';
                    break;
                default:
                    $result .= 'desktop">&nbsp;Desktop/PC';
                    break;
            }
            $result .= '</em></span></a></td>';
            $result .= '<td><a href="tickets.php?view=' . $ticket['ticket.id'] . '">' . $ticket['ticket.invoice'] . '</a></td>';
            $result .= '<td><a href="customers.php?view=' . $ticket['customer.id'] . '" class="btn">' . $ticket['customer.name'] . '</a></td><td>';
            if (!empty($ticket['customer.primaryPhone'])) {
                $PrimaryPhone = parent::get('utils')->formatPhone($ticket['customer.primaryPhone']);
                $ringurl = parent::get('ring_central')->make_url($ticket['customer.primaryPhone']);
                if ($ringurl) {
                    $result .= '<a href="#RingUrlModal" data-toggle="modal" rel="tooltip" title="Call ' . $PrimaryPhone . '">&nbsp;<span class="badge badge-warning"><i class="icon-comment icon-white"></i></span></a>';
                } else {
                    //$result .= $framework->get('utils')->formatPhone($ticket['customer.primaryPhone']); // User does not have ring central setup
                }
            } else {
                $result .= 'No phone on file';
            }
            $result .= '</td>';
            /*
            <td><div class="btn-group">';
            			$result .= '<button class="btn">'.$ticket['status.status'].'</button>';
            			$result .= '<button class="btn dropdown-toggle" data-toggle="dropdown">';
            			$result .= '<span class="caret"></span></button>';
            			$result .= '<ul class="dropdown-menu">
            				<li><a href="#">View</a></li>
            				<li><a href="#">Edit</a></li>
            				<li class="divider"></li>
            				<li><a href="#">Close</a></li>';
            			$result .= '</ul></div></td>';
            */
            $result .= '</tr>';
        }
        $result .= '</tbody></table>';
        return $result;
    }
Beispiel #18
0
<?php

session_start();
date_default_timezone_set("America/Fort_Wayne");
include 'framework.php';
$fw = new framework();
$scale_id = $fw->clean_input($_POST['scale_id']);
$tech = $fw->clean_input($_POST['tech']);
$status = $fw->clean_input($_POST['status']);
$stage = $fw->clean_input($_POST['stage']);
$date = date('m/d/Y') . " @ " . date('h:i:s A');
$comments = $fw->clean_input($_POST['comments']);
$digest = md5($_POST['scale_id'] . $_POST['tech'] . $_POST['status'] . $_POST['stage'] . $date);
$sessionDigest = isset($_SESSION['digest']) ? $_SESSION['digest'] : '';
if ($digest != $sessionDigest) {
    @($db = new mysqli('localhost', 'root', '', 'brechbuhler'));
    if (mysqli_connect_error()) {
        $errnum = mysqli_connect_errno();
        echo "Error({$errnum}): Could not connect to database. Please try again later.";
        exit;
    }
    #if ( $stage != "Additional Notes" ) {
    #	$event = "From " . $status . " to " . $stage;
    #} else {
    $event = $stage;
    #}
    $query = "insert into events values\r\n" . "('NULL', " . "'" . $date . "', " . "'" . $scale_id . "', " . "'" . $tech . "', " . "'" . $event . "', " . "'" . $comments . "'); ";
    $result = $db->query($query);
    if ($stage != "Added Additional Notes") {
        $query_two = "update scales set status='" . $stage . "' where id='" . $scale_id . "';";
        $result_two = $db->query($query_two);
<?php

session_start();
date_default_timezone_set('EST');
include 'framework.php';
$fw = new framework();
$username = $fw->clean_input($_POST['username']);
$password = $fw->clean_input($_POST['password']);
@($db = new mysqli('localhost', 'root', '', 'brechbuhler'));
if (mysqli_connect_error()) {
    $errnum = mysqli_connect_errno();
    echo "Error({$errnum}): Could not connect to database. Please try again later.";
    exit;
}
$query = "select * from users where username like '%" . $username . "%'";
$result = $db->query($query);
if ($result) {
    while ($row = $result->fetch_assoc()) {
        $db_id = $row['id'];
        $db_username = $row['username'];
        $db_pass = $row['password'];
        $db_fullname = $row['fullname'];
        $db_email = $row['email'];
        $db_user = $row['is_user'];
        $db_admin = $row['is_admin'];
        $db_superadmin = $row['is_superadmin'];
    }
    if (sha1($password) == $db_pass) {
        $digest = md5($db_id . $db_username . $db_fullname . $db_pass . $db_email . $db_user . $db_admin . $db_superadmin);
    } else {
        header("Location: login.php?result=1");
Beispiel #20
0
 /**
  * User object constructor. Please read carefully.
  *
  * @param object|array              $instance Required at all times.
  *    A parent object instance, which contains the parent's `$instance`,
  *    or a new `$instance` array.
  *
  * @param null|integer              $user_id Defaults to NULL. A specific user?
  *    If this and `$by`, `$value` are all NULL, we construct an instance for the current user.
  *
  * @param null|string               $by Search for a user, by a particular type of value?
  *    For further details, please see {@link user_utils::get_id_by()}.
  *
  * @param null|string|integer|array $value A value to search for (e.g. username(s), email address(es), ID(s)).
  *    For further details, please see {@link user_utils::get_id_by()}.
  *
  * @param array                     $default_properties Optional. Defaults to an empty array.
  *    Passed to {@link populate()} to establish some default properties before population attempts take place.
  *    This can be useful if reconstructing an object for a user that does NOT have an ID (as one example).
  *    See also {@link $data}. It IS possible to define custom {@link $data} keys w/ this parameter.
  *
  * @throws exception If invalid types are passed through arguments list.
  * @throws exception If `$default_properties` contains invalid data types.
  * @throws exception If `$default_properties` contains undefined property keys.
  */
 public function __construct($instance, $user_id = NULL, $by = NULL, $value = NULL, $default_properties = array())
 {
     parent::__construct($instance);
     // Parent constructor.
     $this->check_arg_types('', array('null', 'integer'), array('null', 'string:!empty'), array('null', 'string:!empty', 'integer:!empty', 'array:!empty'), 'array', func_get_args());
     if (!did_action('set_current_user')) {
         throw $this->©exception($this->method(__FUNCTION__) . '#set_current_user', array_merge(get_defined_vars(), array('user' => $this)), $this->__('Doing it wrong (the `set_current_user` hook has NOT been fired yet).'));
     }
     if ($user_id && $user_id < 0) {
         $by = $value = NULL;
     }
     // Nullify.
     $this->args = array('user_id' => $user_id, 'by' => $by, 'value' => $value, 'default_properties' => $default_properties);
     if (!isset($user_id) && !isset($by) && !isset($value)) {
         if (($_wp = wp_get_current_user()) && !empty($_wp->ID)) {
             $this->wp = $_wp;
             $this->ID = $_wp->ID;
         }
         $this->is_current_default = TRUE;
     } else {
         if ($user_id && $user_id < 0) {
             $this->ID = 0;
             $this->wp = NULL;
             $this->is_no_user = TRUE;
         } else {
             if ($user_id && ($_wp = new \WP_User($user_id)) && !empty($_wp->ID)) {
                 $this->wp = $_wp;
                 $this->ID = $_wp->ID;
             } else {
                 if ($by && $value && strtolower($by) === 'id' && is_numeric($value) && ($_wp = new \WP_User((int) $value)) && !empty($_wp->ID)) {
                     $this->wp = $_wp;
                     $this->ID = $_wp->ID;
                 } else {
                     if ($by && $value && ($_id_by = $this->©user_utils->get_id_by($by, $value)) && ($_wp = new \WP_User($_id_by)) && !empty($_wp->ID)) {
                         $this->wp = $_wp;
                         $this->ID = $_wp->ID;
                     }
                 }
             }
         }
     }
     // Else by default this instance has no ID (all default properties).
     // This is NOT the same as having NO user (explicitly) via `-1`; which identifies this instance
     // as having been purposely instantiated for such a purpose (e.g. to indicate NO user explicitly).
     if ($this->ID && (!$this->wp || !$this->wp->user_email || !$this->wp->user_login || !$this->wp->user_nicename)) {
         $this->©error($this->method(__FUNCTION__), array_merge(get_defined_vars(), array('user' => $this)), sprintf($this->__('User ID: `%1$s` is missing vital components.'), $this->ID) . ' ' . $this->__('Possible database corruption.'));
         $this->wp = NULL;
         $this->ID = 0;
     }
     unset($_wp, $_id_by);
     // Housekeeping.
     $this->populate();
     // Populate (if possible).
 }
Beispiel #21
0
<?php

session_start();
include 'framework.php';
$fw = new framework();
$type = $fw->clean_input($_POST['search_type']);
$criteria = $fw->clean_input($_POST['search_criteria']);
if ($type == "default") {
    $_SESSION['search_go'] = 1;
    $_SESSION['search_query'] = "select * from scales where status != 'Complete' AND status != 'Non-repairable' AND status != 'Replaced the Scale' AND status != 'Delivered'";
    $_SESSION['search_criteria'] = "Based on the default search criteria <br />";
    header("Location: showRepairs.php");
    die;
} else {
    $db = new mysqli('localhost', 'root', '', 'brechbuhler');
    if (mysqli_connect_error()) {
        $errnum = mysqli_connect_errno();
        echo "Error({$errnum}): Could not connect to database. Please try again later.";
        exit;
    }
    if ($type == "id" || $type == "scale_capacity") {
        $query = "select * from scales where {$type} = '" . $criteria . "'";
    } else {
        $query = "select * from scales where {$type} like '%" . $criteria . "%'";
    }
    $result = $db->query($query);
    $_SESSION['search_criteria'] = "\n\t\t\t<table class=\"table-striped\" style=\"max-width: 250px;\">\n\t\t\t\t<thead style=\"background-color: black; color: white;\">\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td colspan=\"2\">Based on this search criteria</td>\n\t\t\t\t\t</tr>\n\t\t\t\t</thead>\n\t\t\t\t<tbody>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>Type</td>\n\t\t\t\t\t\t<td>{$type}</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>Criteria</td>\n\t\t\t\t\t\t<td>{$criteria}</td>\n\t\t\t\t\t</tr>\n\t\t\t\t</tbody>\n\t\t\t</table>";
    if ($result) {
        $_SESSION['search_go'] = 1;
        $_SESSION['search_query'] = $query;
        //$result->free();
Beispiel #22
0
 /**
  * Constructor.
  *
  * @param object|array $instance Required at all times.
  *    A parent object instance, which contains the parent's `$instance`,
  *    or a new `$instance` array.
  *
  * @throws exception If this class is instantiated before the `init` action hook.
  */
 public function __construct($instance)
 {
     parent::__construct($instance);
     if (!did_action('init')) {
         throw $this->©exception($this->method(__FUNCTION__) . '#init', NULL, $this->__('Doing it wrong (the `init` hook has NOT been fired yet).'));
     }
     $themes = $this->themes();
     $theme_keys = array_keys($themes);
     $styles_to_register = array();
     // Initialize styles.
     // Core libs & themes; available in all contexts.
     if (!wp_style_is($this->instance->core_ns_with_dashes, 'registered')) {
         $styles_to_register[$this->instance->core_ns_with_dashes] = array('url' => $this->©url->to_core_dir_file('/client-side/styles/core-libs.min.css'), 'ver' => $this->instance->core_version_with_dashes);
     }
     foreach ($themes as $_theme => $_theme_file) {
         if (!wp_style_is($_theme, 'registered')) {
             $styles_to_register[$this->instance->core_ns_with_dashes . '--' . $_theme] = array('deps' => array($this->instance->core_ns_with_dashes), 'url' => $this->©url->to_wp_abs_dir_file($_theme_file), 'ver' => $this->instance->core_version_with_dashes);
         }
     }
     unset($_theme, $_theme_file);
     // A little housekeeping.
     // Front-side components (including themes); available in all contexts.
     $this->front_side_components = $this->front_side_components();
     if (!in_array($current_front_side_theme = $this->©options->get('styles.front_side.theme'), $theme_keys, TRUE)) {
         $current_front_side_theme = $this->©options->get('styles.front_side.theme', TRUE);
     }
     $front_side_themes = array($this->instance->core_ns_with_dashes . '--' . $current_front_side_theme);
     foreach ($this->©options->get('styles.front_side.load_themes') as $_theme) {
         if (in_array($_theme, $theme_keys, TRUE)) {
             // Let's make sure it's a valid theme.
             $front_side_themes[] = $this->instance->core_ns_with_dashes . '--' . $_theme;
         }
     }
     $front_side_themes = array_unique($front_side_themes);
     unset($_theme);
     // Housekeeping.
     if ($front_side_file = $this->©file->template('client-side/styles/front-side.min.css', TRUE)) {
         $this->front_side_components[] = $this->instance->plugin_root_ns_with_dashes . '--front-side';
         $styles_to_register[$this->instance->plugin_root_ns_with_dashes . '--front-side'] = array('deps' => array_merge(array($this->instance->core_ns_with_dashes), $front_side_themes), 'url' => $this->©url->to_wp_abs_dir_file($front_side_file), 'ver' => $this->instance->plugin_version_with_dashes);
     } else {
         $this->front_side_components = array_merge($this->front_side_components, array($this->instance->core_ns_with_dashes), $front_side_themes);
     }
     // Stand-alone components; available in all contexts (depends on front-side).
     $this->stand_alone_components = $this->stand_alone_components();
     if ($stand_alone_file = $this->©file->template('client-side/styles/stand-alone.min.css', TRUE)) {
         $this->stand_alone_components[] = $this->instance->plugin_root_ns_with_dashes . '--stand-alone';
         $styles_to_register[$this->instance->plugin_root_ns_with_dashes . '--stand-alone'] = array('deps' => $this->front_side_components, 'url' => $this->©url->to_wp_abs_dir_file($stand_alone_file), 'ver' => $this->instance->plugin_version_with_dashes);
     } else {
         $this->stand_alone_components = array_merge($this->stand_alone_components, $this->front_side_components);
     }
     // Menu page components; only if applicable.
     if ($this->©menu_page->is_plugin_page()) {
         $this->menu_page_components = $this->menu_page_components();
         if (!in_array($current_menu_pages_theme = $this->©options->get('menu_pages.theme'), $theme_keys, TRUE)) {
             $current_menu_pages_theme = $this->©options->get('menu_pages.theme', TRUE);
         }
         $this->menu_page_components[] = $this->instance->core_ns_with_dashes . '--menu-pages';
         // Only if NOT already registered by another XDaRk plugin (it should NOT be).
         if (!wp_style_is($this->instance->core_ns_with_dashes . '--menu-pages', 'registered')) {
             $styles_to_register[$this->instance->core_ns_with_dashes . '--menu-pages'] = array('deps' => array($this->instance->core_ns_with_dashes . '--' . $current_menu_pages_theme), 'url' => $this->©url->to_core_dir_file('/client-side/styles/menu-pages/menu-pages.min.css'), 'ver' => $this->instance->core_version_with_dashes);
         }
     }
     if ($styles_to_register) {
         $this->register($styles_to_register);
     }
 }
Beispiel #23
0
<?php

session_start();
date_default_timezone_set('EST');
include 'framework.php';
$fw = new framework();
$techname = $fw->clean_input($_POST['techname']);
$companyname = $fw->clean_input($_POST['companyname']);
$street = $fw->clean_input($_POST['street']);
$city = $fw->clean_input($_POST['city']);
$state = $fw->clean_input($_POST['state']);
$zipcode = $fw->clean_input($_POST['zipcode']);
$indicator_tag = $fw->clean_input($_POST['indicator_tag']);
$indicator_manu = $fw->clean_input($_POST['indicator_manu']);
$indicator_model = $fw->clean_input($_POST['indicator_model']);
$indicator_serial = $fw->clean_input($_POST['indicator_serial']);
$scale_manu = $fw->clean_input($_POST['scale_manu']);
$scale_model = $fw->clean_input($_POST['scale_model']);
$scale_serial = $fw->clean_input($_POST['scale_serial']);
$scale_capacity = $fw->clean_input($_POST['scale_capacity']);
$scale_divisions = $fw->clean_input($_POST['scale_divisions']);
$units = $fw->clean_input($_POST['units']);
$date = date('m/d/Y') . " @ " . date('h:i:s A');
$comments = $fw->clean_input($_POST['comments']);
$status = $fw->clean_input($_POST['status']);
if ($state == "NU") {
    $state == "IN";
}
$digest = md5($_POST['techname'] . $_POST['companyname'] . $_POST['street'] . $_POST['city'] . $_POST['state'] . $_POST['indicator_manu'] . $_POST['indicator_model'] . $_POST['indicator_serial'] . $_POST['scale_manu'] . $_POST['scale_model'] . $_POST['scale_serial'] . $_POST['scale_capacity'] . $_POST['scale_divisions'] . date('m') . "/" . date('d') . "/" . date('Y'));
$sessionDigest = isset($_SESSION['digest']) ? $_SESSION['digest'] : '';
//echo "Digest: " . $digest . "<br />";
 /**
  * Constructor.
  *
  * @param object|array $instance Required at all times.
  *    A parent object instance, which contains the parent's `$instance`,
  *    or a new `$instance` array.
  *
  * @param string $code Optional diagnostic code (to construct with a new diagnostic).
  *
  * @param mixed $data Optional diagnostic data (i.e. something to assist in reporting/logging).
  *    This argument can be bypassed using a NULL value (that's fine).
  *
  * @param string $message Optional diagnostic message (if constructing with a new diagnostic).
  *
  * @param string $log Optional. This defaults to the value of {@link fw_constants::log_enable}.
  *    This simply provides some additional control over which specific diagnostics will be logged (if any).
  *    By default, we enable logging on a per-diagnostic basis. However, even if this is {@link fw_constants::log_enable},
  *    logging ONLY occurs if enabled overall (based on diagnostic type). Can also be set to {@link fw_constants::log_disable}.
  *
  * @throws exception If invalid types are passed through arguments list.
  */
 public function __construct($instance, $code = '', $data = null, $message = '', $log = self::log_enable)
 {
     parent::__construct($instance);
     $this->check_arg_types('', 'string:!empty', '', 'string', 'string:!empty', func_get_args());
     if (!empty($code)) {
         $this->add($code, $data, $message, $log);
     }
 }
Beispiel #25
0
<?php

require "global/php/framework.php";
require "global/php/mysql.php";
$global = new framework("global", "global");
$global->title = "Space Science Data Grid";
$global->sql = new mysql("localhost", "root", "868686", "cssdc", "utf8");
$global->main();
Beispiel #26
0
    // Attention: Be aware of loops!
    if (isset($db) and $db->success) {
        $db->qry('INSERT INTO %prefix%log
        SET date = NOW(), userid = %int%, type = 3, description = %string%, sort_tag = "PHP-Fehler"', (int) $auth['userid'], $err);
    }
    return true;
}
$PHPErrorsFound = 0;
$PHPErrors = '';
set_error_handler("myErrorHandler");
### Start session-management
#session_save_path('ext_inc/session'); Leave to hosters default value, for some don't seam to empty it and data here counts against web space quota
session_start();
### Initialise Frameworkclass for Basic output
include_once "inc/classes/class_framework.php";
$framework = new framework();
$framework->fullscreen($_GET['fullscreen']);
// Switch fullscreen via GET
// Notlösung... design als base und popup sollen ganz verschwinden
if ($_GET['design'] == 'base' or $_GET['design'] == 'popup' or $_GET['design'] == 'ajax' or $_GET['design'] == 'print' or $_GET['design'] == 'beamer') {
    $frmwrkmode = $_GET['design'];
}
// Set Popupmode via GET (base, popup)
if ($_GET['frmwrkmode']) {
    $frmwrkmode = $_GET['frmwrkmode'];
}
// Set Popupmode via GET (base, popup)
if (isset($frmwrkmode)) {
    $framework->set_modus($frmwrkmode);
}
// Ende Notlösung
 /**
  * Constructor (initiates replication).
  *
  * @param object|array $instance Required at all times.
  *    A parent object instance, which contains the parent's `$instance`,
  *    or a new `$instance` array.
  *
  * @param string       $into_dir Optional. Defaults to an empty string.
  *    If this is supplied, the core will be replicated into this specific directory.
  *    Else, the core will be replicated into a sub-directory of the local core repo directory.
  *
  * @param string       $update_dir Optional. Defaults to an empty string.
  *    Please use with EXTREME caution; this performs a MASSIVE search/replace routine.
  *    If TRUE, all files inside `$update_dir` will be updated to match the version of the newly replicated core.
  *    If FALSE, we simply update files in the new core directory; nothing more.
  *
  * @param string       $version Optional. Defaults to an empty string.
  *    By default, the version remains unchanged (e.g. it will NOT be updated by this routine).
  *    If this is NOT empty, we will replicate the core as a specific version indicated by this value.
  *
  * @param array        $exclusions Optional. An array of copy-to exclusions. Defaults to an empty array.
  *    See: {@link dirs::copy_to()} for details about this parameter.
  *
  * @note Instantiation of this class will initiate the replication routine (please be VERY careful).
  *    Property `$success` will contain a message indicating the final result status of the replication procedure.
  *    If there is a failure, an exception is thrown by this class. We either succeed completely; or throw an exception.
  *
  * @throws exception If invalid types are passed through arguments list.
  * @throws exception If unable to replicate according to `$this->can_replicate`.
  * @throws exception See: `replicate()` method for further details.
  */
 public function __construct($instance, $into_dir = '', $update_dir = '', $version = '', $exclusions = array())
 {
     parent::__construct($instance);
     $this->check_arg_types('', 'string', 'string', 'string', 'array', func_get_args());
     // Security check. Can we replicate here?
     if ($this->©env->is_cli() && $this->©plugin->is_core()) {
         if (defined('___REPLICATOR') && ___REPLICATOR || defined('___BUILDER') && ___BUILDER) {
             $this->can_replicate = TRUE;
         }
     }
     // We CAN replicate.
     if (!$this->can_replicate) {
         throw $this->©exception($this->method(__FUNCTION__) . '#cannot_replicate', get_defined_vars(), $this->__('Security check. Unable to replicate (not allowed here).'));
     }
     // Construct object properties.
     $this->core_dir = $this->instance->core_dir;
     $this->core_repo_dir = $this->instance->local_core_repo_dir;
     $this->into_dir = $into_dir ? $this->©dir->n_seps($into_dir) : $this->instance->local_core_repo_dir;
     $this->version = $version ? $version : $this->instance->core_version;
     $this->exclusions = $exclusions ? $exclusions : array();
     $this->new_core_ns_version = $this->instance->core_ns_stub_v . $this->©string->with_underscores($this->version);
     $this->new_core_ns_version_with_dashes = $this->©string->with_dashes($this->new_core_ns_version);
     $this->new_core_dir = $this->into_dir . '/' . $this->new_core_ns_version_with_dashes;
     $this->update_dir = $update_dir ? $this->©dir->n_seps($update_dir) : $this->new_core_dir;
     // Validate object properties (among several other things).
     if (!is_dir($this->into_dir)) {
         throw $this->©exception($this->method(__FUNCTION__) . '#invalid_into_dir', get_defined_vars(), sprintf($this->__('Invalid directory: `%1$s`.'), $this->into_dir) . ' ' . $this->__('This is NOT an existing directory that we can replicate into.'));
     }
     if ($this->update_dir !== $this->new_core_dir && !is_dir($this->update_dir)) {
         throw $this->©exception($this->method(__FUNCTION__) . '#invalid_update_dir', get_defined_vars(), sprintf($this->__('Invalid directory: `%1$s`.'), $this->into_dir) . ' ' . $this->__('This is NOT an existing directory that we can update files in.'));
     }
     if (!$this->©string->is_plugin_version($this->version)) {
         throw $this->©exception($this->method(__FUNCTION__) . '#invalid_version', get_defined_vars(), sprintf($this->__('Invalid %1$s version: `%2$s`.'), $this->instance->core_name, $this->version));
     }
     // Object construction & initial validation complete.
     $this->success = $this->replicate();
     // Process replication routines.
 }
 /**
  * @param array|\xd_v141226_dev\framework $instance
  *
  * @throws \exception
  * @throws \xd_v141226_dev\exception
  */
 public function __construct($instance)
 {
     parent::__construct($instance);
     $this->redirect_uri = $this->©option->get('redirect_uri');
 }
<?php

session_start();
date_default_timezone_set('EST');
if (isset($_SESSION['val_username']) && $_SESSION['val_username'] != "" && isset($_SESSION['val_digest']) && $_SESSION['val_digest'] != "") {
    include 'framework.php';
    $fw = new framework();
    $techname = $_SESSION['val_fullname'];
    $username = $_SESSION['val_username'];
    $oldpass = $fw->clean_input($_POST['oldPass']);
    $newpass1 = $fw->clean_input($_POST['newPass1']);
    $newpass2 = $fw->clean_input($_POST['newPass2']);
    $date = date('m/d/Y') . " @ " . date('h:i:s A');
    @($db = new mysqli('localhost', 'root', '', 'brechbuhler'));
    if (mysqli_connect_error()) {
        $errnum = mysqli_connect_errno();
        echo "Error({$errnum}): Could not connect to database. Please try again later.";
        exit;
    }
    #Check if the scale still exists in the database
    $query_user = "******" . $username . "'";
    $result_user = $db->query($query_user);
    if ($query_user) {
        while ($row = $result_user->fetch_assoc()) {
            $db_pass = $row['password'];
            $db_name = $row['fullname'];
            $db_user = $row['username'];
        }
        if ($db_pass == sha1($oldpass)) {
            if ($db_name == $_SESSION['val_fullname'] && $db_user == $_SESSION['val_username']) {
                if ($newpass1 == $newpass2 && $newpass1 != $oldpass) {
Beispiel #30
0
 /**
  * Constructor.
  *
  * @param object|array $instance Required at all times.
  *    A parent object instance, which contains the parent's `$instance`,
  *    or a new `$instance` array.
  *
  * @throws exception If invalid types are passed through arguments list.
  */
 public function __construct($instance)
 {
     parent::__construct($instance);
     // Construct instance.
     $this->sass = 'sass --cache-location=' . escapeshellarg($this->©dir->temp() . '/.sass-cache');
 }