예제 #1
0
 /**
  *   Set a property's value.
  *
  *   @param  string  $var    Name of property to set.
  *   @param  mixed   $value  New value for property.
  */
 public function __set($var, $value = '')
 {
     switch ($var) {
         case 'ev_id':
             $this->properties[$var] = COM_sanitizeId($value, false);
             break;
         case 'rp_id':
         case 'det_id':
         case 'uid':
             $this->properties[$var] = (int) $value;
             break;
         case 'date_start':
         case 'date_end':
             // String values
             $this->properties[$var] = trim(COM_checkHTML($value));
             break;
         case 'time_start1':
         case 'time_end1':
         case 'time_start2':
         case 'time_end2':
             $this->properties[$var] = empty($value) ? '00:00:00' : trim($value);
             break;
         default:
             // Undefined values (do nothing)
             break;
     }
 }
예제 #2
0
 /**
  *   Magic "setter" function.
  *
  *   @param  string  $key    Name of property to set
  *   @param  mixed   $value  Value to set
  */
 function __set($key, $value)
 {
     switch ($key) {
         case 'currency_code':
         case 'item_name':
             $this->properties[$key] = trim($value);
             break;
         case 'item_number':
             $this->properties[$key] = COM_sanitizeId($value, false);
             break;
         case 'amount':
             $this->properties[$key] = (double) $value;
             break;
         case 'get_shipping':
             $this->properties[$key] = (int) $value;
     }
 }
예제 #3
0
 /**
  *   Magic "setter" function
  *
  *   @see    PaymentGw::__get()
  *   @param  string  $key    Name of property to set
  *   @param  mixed   $value  New value for property
  */
 function __set($key, $value)
 {
     switch ($key) {
         case 'business':
         case 'item_name':
         case 'currency_code':
         case 'cert_id':
         case 'bus_prod_email':
         case 'micro_prod_email':
         case 'bus_test_email':
         case 'micro_test_email':
             $this->properties[$key] = trim($value);
             break;
         case 'item_number':
             $this->properties[$key] = COM_sanitizeId($value, false);
             break;
         case 'amount':
         case 'weight':
         case 'tax':
         case 'shipping_amount':
             $this->properties[$key] = (double) $value;
             break;
         case 'shipping_type':
             $this->properties[$key] = (int) $value;
             break;
         case 'service':
             foreach ($value as $svc => $enabled) {
                 $this->services[$svc] = $enabled == 1 ? 1 : 0;
             }
             break;
             /*case 'buy_now':
               case 'pay_now':
               case 'donation':
               case 'subscribe':
                   $this->services[$key] = $value == 1 ? 1 : 0;
                   break;*/
     }
 }
예제 #4
0
파일: index.php 프로젝트: matrox66/evlist
 case 'disapprove':
     // Delete a submission.  We'll just do this manually since there's
     // not much to it.
     $id = isset($_POST['eid']) ? COM_sanitizeId($_POST['eid']) : '';
     if ($id != '') {
         DB_delete($_TABLES['evlist_submissions'], 'id', $id);
         DB_delete($_TABLES['evlist_detail'], 'ev_id', $id);
         DB_delete($_TABLES['evlist_lookup'], 'eid', $id);
     }
     echo COM_refresh($_CONF['site_admin_url'] . '/moderation.php');
     exit;
     break;
 case 'approve':
     // Invoke the core moderation approval functions.
     // It'd be nice if the MODERATE functions weren't in moderate.php
     $id = isset($_POST['eid']) ? COM_sanitizeId($_POST['eid']) : '';
     if ($id != '') {
         list($key, $table, $fields, $submissiontable) = plugin_moderationvalues_evlist();
         DB_copy($table, $fields, $fields, $submissiontable, $key, $id);
         plugin_moderationapprove_evlist($id);
     }
     echo COM_refresh($_CONF['site_admin_url'] . '/moderation.php');
     exit;
     break;
 case 'view':
     $view = $actionval;
     break;
 case 'importcalendar':
     require_once EVLIST_PI_PATH . '/calendar_import.php';
     $errors = evlist_import_calendar_events();
     if ($errors == -1) {