Exemplo n.º 1
0
 function save($data)
 {
     if (isset($data['categoryName'])) {
         $data['categoryName'] = stripslashes($data['categoryName']);
     }
     parent::save($data);
 }
Exemplo n.º 2
0
 function __construct(&$db = null)
 {
     $db =& JFactory::getDBO();
     $this->db = $db;
     $this->displayField = 'title';
     parent::__construct('#__sections', 'id', $db);
 }
Exemplo n.º 3
0
 function __construct(&$db = null)
 {
     $db =& JFactory::getDBO();
     $this->db =& $db;
     parent::__construct('#__dtregister_permissions', 'id', $db);
     $this->ModelAco = DtrModel::getInstance('aco', 'DtregisterModel');
 }
Exemplo n.º 4
0
 function __construct($config = array())
 {
     $config['name'] = 'config';
     parent::__construct($config);
     $this->table = new DtrTable('#__dtregister_config', 'id', $this->getDBO());
     $this->TablePayoption =& DtrTable::getInstance('payoption', 'Table');
     $this->db = $this->getDBO();
 }
Exemplo n.º 5
0
 function load($id)
 {
     parent::load($id);
     $this->events = json_decode($this->events);
     $this->general_export_fields = $this->general_export_fields == '' ? array() : json_decode($this->general_export_fields);
     $this->group_export_fields = $this->group_export_fields == '' ? array() : json_decode($this->group_export_fields);
     $this->individual_export_fields = $this->individual_export_fields == '' ? array() : json_decode($this->individual_export_fields);
 }
Exemplo n.º 6
0
 function remove()
 {
     jimport('joomla.filesystem.file');
     $data = $this->find(' path = ' . $this->db->Quote($this->path));
     if ($data && $this->_db->getNumRows($this->_db->query()) == 1) {
         JFile::delete($this->path);
     }
     parent::delete();
 }
Exemplo n.º 7
0
 function save($data)
 {
     if (isset($data['user_id'])) {
         $feerow = $this->findByUserId($data['user_id']);
         if ($feerow) {
             $data['id'] = $feerow->id;
         }
     }
     parent::save($data);
 }
Exemplo n.º 8
0
 function email()
 {
     global $usercreation;
     $database =& JFactory::getDBO();
     ob_clean();
     $eventId = $_GET['eventId'];
     $sql = "Select config_value From #__dtregister_config where config_key = 'prevent_duplication'";
     $database->setQuery($sql);
     $prevent_duplication = $database->loadResult();
     $global_prevent_duplication = $prevent_duplication;
     $eventTable =& DtrTable::getInstance('Event', 'Table');
     $eventTable->load($eventId);
     $prevent_duplication = $eventTable->prevent_duplication;
     $eventTable->overrideGlobal($eventId);
     $usercreation = $eventTable->usercreation;
     $my =& JFactory::getUser();
     $field_id = key($_REQUEST['Field']);
     $email = array_pop($_REQUEST['Field']);
     if (!$my->id && $usercreation > 0 && !isset($_GET['member_check'])) {
         $sql = "SELECT COUNT(*) FROM #__users WHERE email='{$email}' ";
         $database->setQuery($sql);
         $total = $database->loadResult();
         if ($total) {
             echo "\"" . JText::_('DT_JOOMLA_EMAIL_EXISTS') . "\"";
         } else {
             echo "true";
         }
         die;
     }
     if ($prevent_duplication) {
         $prevent_duplication = $global_prevent_duplication;
     } else {
         $prevent_duplication = 0;
     }
     if (!$prevent_duplication || isset($_REQUEST['dup_check'])) {
         echo "true";
     } else {
         $sql = "SELECT COUNT(*) FROM #__dtregister_user u inner join #__dtregister_user_field_values v on u.userId  = v.user_id   WHERE eventId='{$eventId}'  AND v.field_id = {$field_id}  and v.`value` = '{$email}' and u.cancel <> 1";
         $database->setQuery($sql);
         $total = $database->loadResult();
         if ($total) {
             $clean = ob_get_clean();
             echo "\"" . JText::_('DT_ALREADY_REGISTERED') . "\"";
             die;
         } else {
             echo "true";
         }
     }
     die;
 }
Exemplo n.º 9
0
 function __construct($config = array())
 {
     $this->defaultfields = array('firstname', 'lastname', 'zip', 'city', 'state', 'phone', 'email', 'address', 'address2', 'title', 'organization', 'country');
     parent::__construct($config);
     $this->TableEvent =& DtrTable::getInstance('Event', 'Table');
     $this->TableUser =& DtrTable::getInstance('Duser', 'Table');
     $this->TableUsergroupamount =& DtrTable::getInstance('Usergroupamount', 'Table');
     $this->TableUserfield =& DtrTable::getInstance('Userfield', 'Table');
     $this->TableMember =& DtrTable::getInstance('Member', 'Table');
     $this->fieldmapByName = array();
     $this->fieldmapById = array();
     $this->UserFldsTodefault = array('userFirstName' => 'firstname', 'userLastName' => 'lastname', 'userOrganization' => 'organization', 'userAddress' => 'address', 'userAddress2' => 'address2', 'userCity' => 'city', 'userState' => 'state', 'userCountry' => 'country', 'userZip' => 'zip', 'userPhone' => 'phone', 'userEmail' => 'email', 'userTitle' => 'title');
     $this->UserFldsTodefault = array_flip($this->UserFldsTodefault);
     $this->mapFields();
 }
Exemplo n.º 10
0
 function __construct(&$db)
 {
     $this->db = $db;
     parent::__construct('#__comprofiler', 'id', $db);
     $this->CBField = new DTCBFields($db);
     $this->fields = $this->CBField->find();
     if (count($this->fields) > 0) {
         foreach ($this->fields as $field) {
             $name = $field->name;
             if (isset($name) && $name != "") {
                 $this->{$name} = "";
             }
         }
     }
 }
Exemplo n.º 11
0
 function load($id)
 {
     parent::load($id);
     $query = "select * from #__community_fields_values where user_id = {$id} ";
     $data = $this->query($query);
     if (is_array($data)) {
         foreach ($data as $row) {
             if (isset($this->fields[$row->field_id])) {
                 $field = $this->fields[$row->field_id];
             }
             if (isset($field->fieldcode) && isset($row->value) && $row->value != "") {
                 $this->{$field->fieldcode} = $row->value;
             }
         }
     }
 }
Exemplo n.º 12
0
 function email()
 {
     global $usercreation;
     $database =& JFactory::getDBO();
     ob_clean();
     $sql = "Select config_value From #__dtregister_config where config_key = 'prevent_duplication'";
     $database->setQuery($sql);
     $prevent_duplication = $database->loadResult();
     $global_prevent_duplication = $prevent_duplication;
     $eventTable =& DtrTable::getInstance('Event', 'Table');
     $eventId = $_GET['eventId'];
     $eventTable->overrideGlobal($eventId);
     $my =& JFactory::getUser();
     if (!$my->id && $usercreation == 1) {
         $email = array_pop($_GET['Field']);
         $sql = "SELECT COUNT(*) FROM #__users WHERE email='{$email}' ";
         $database->setQuery($sql);
         $total = $database->loadResult();
         if ($total) {
             echo "false";
         } else {
             echo "true";
         }
     }
     if ($prevent_duplication == 1) {
         $prevent_duplication = $global_prevent_duplication;
     } else {
         $prevent_duplication = 0;
     }
     if (!$prevent_duplication) {
         echo "true";
     } else {
         $email = array_pop($_GET['Field']);
         $field_id = key($_GET['Field']);
         $sql = "SELECT COUNT(*) FROM #__dtregister_user u inner join #__dtregister_user_field_values v u.userId  = v.user_id on  WHERE eventId='{$eventId}'  AND userEmail='{$email}' and u.cancel <> 1";
         $database->setQuery($sql);
         $total = $database->loadResult();
         if ($total) {
             echo "false";
         } else {
             echo "true";
         }
     }
 }
Exemplo n.º 13
0
 function save()
 {
     parent::save();
 }
Exemplo n.º 14
0
 function __construct(&$db = null)
 {
     $db =& JFactory::getDBO();
     $this->db =& $db;
     parent::__construct('#__jevents_vevdetail', 'evdet_id', $db);
 }
Exemplo n.º 15
0
 function delete($id = 0)
 {
     $this->query("delete from #__dtregister_permissions where aro_id=" . $id);
     parent::delete($id);
 }
Exemplo n.º 16
0
* @copyright contact dthdev@dthdevelopment.com
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
*/
?>

<div id="dt_pricebox">
  
	  <?php 
global $currency_code, $show_price_tax, $show_fee_breakdown;
$mEvent = $this->getModel('event');
$tEvent = $mEvent->table;
$tEvent->load(DT_Session::get('register.Event.eventId'));
$tEvent->overrideGlobal(DT_Session::get('register.Event.eventId'));
//pr($tEvent);
$userIndex = DT_Session::get('register.Setting.current.userIndex');
$TableUser =& DtrTable::getInstance('Duser', 'Table');
$TableUser->create(DT_Session::get('register.User.' . $userIndex));
$feeObj = new DT_Fee($tEvent, $TableUser);
$juser = JFactory::getUser();
$feeObj->getFee($juser->id);
// pr( $feeObj->slab->type);
if ($feeObj->paid_fee > 0) {
    $memtot = $TableUser->memtot;
    $discount = $feeObj->memberdiscount + $feeObj->birddiscount + $feeObj->discountcodefee;
    ?>
            <strong><?php 
    echo JText::_('TOTAL_REGISTRATION_COST');
    ?>
:</strong> <?php 
    echo DTreg::displayRate($feeObj->paid_fee, $currency_code);
    ?>
Exemplo n.º 17
0
                 </tr>

		         <tr class="billinginfo">
		             <td><?php 
echo JText::_('DT_ZIPCODE');
?>
:<span class="dtrequired">  *  </span></td>
		             <td align="left"> <input id="billingZipcode" class="inputbox required" type="text" name="billing[zipcode]" value="<?php 
echo isset($tUser->card) && $tUser->card ? $tUser->card->zipcode : '';
?>
" /> </td>
		             <td> </td>
		         </tr>
		
    <?php 
$countylist =& DtrTable::getInstance('Field', 'Table');
$field = $countylist->fingbyName('country');
if ($field) {
    $dropDownDatas = explode("|", $field->values);
    $value = isset($tUser->card) && $tUser->card ? $tUser->card->country : $field->selected;
    $countrydropdown = JHTML::_('select.genericlist', DtHtml::options($dropDownDatas, JText::_("DT_SELECT_COUNTRY")), 'billing[country]', ' ', 'value', 'text', $value);
}
?>
     <tr class="billinginfo">
			   <td>
				 <?php 
echo JText::_('DT_COUNTRY');
?>
			   </td>
			   <td>
				 <?php 
Exemplo n.º 18
0
 function all_fields($recipient)
 {
     $user = $this->getuser($recipient);
     $field = DtrTable::getInstance('field', 'Table');
     $fieldType = DtrModel::getInstance('Fieldtype', 'DtregisterModel');
     $txt = "";
     $txt_parts = array();
     $fieldTypes = $fieldType->getTypes();
     foreach ($user->fields as $field_id => $value) {
         $field->load($field_id);
         if ($field->all_tag_enable) {
             $class = "Field_" . $fieldTypes[$field->type];
             $fieldTable = new $class();
             $fieldTable->load($field->id);
             $function = "viewHtml";
             if (method_exists($fieldTable, 'exportView')) {
                 $function = "exportView";
             }
             $value = $fieldTable->{$function}((array) $user);
             //$txt .= $fieldTable->label.': '.$value.'<br />';
             if (isset($value) && $value != "") {
                 $txt_parts[] = stripslashes($fieldTable->label) . ': ' . $value;
             }
         }
     }
     //$txt_parts = array_reverse($txt_parts);
     $txt = implode("<br />", $txt_parts);
     return $txt;
 }
Exemplo n.º 19
0
 function confirm()
 {
     global $mainframe, $Itemid, $xhtml;
     if (false === DT_Session::get('register.Event.eventId') || DT_Session::get('register.Event.eventId') == 0) {
         $mainframe->redirect("index.php?option=com_dtregister&Itemid=" . $Itemid);
     }
     global $Itemid, $mainframe, $xhtml_url;
     $this->view->setModel($this->getModel('field'));
     $this->view->setModel($this->getModel('fieldtype'));
     $userIndex = DT_Session::get('register.Setting.current.userIndex');
     $step = JRequest::getVar('step', 0);
     $my =& JFactory::getUser();
     if ($step === "confirm") {
         /*foreach(DT_Session::get('register.User') as $key=>$registration){
         			pr($registration);
         		}*/
         // pr(DT_Session::get('register.User')); prd('exit here');
         $paying_amount = JRequest::getVar('paying_amount', 0);
         DT_Session::clear('register.User.process');
         DT_Session::set('register.User.' . $userIndex . '.fee.paid_amount', $paying_amount);
         DT_Session::set('register.User.' . $userIndex . '.fee.paying_amount', $paying_amount);
         DT_Session::set('register.User.' . $userIndex . '.confirmed', 1);
         if ($my->id) {
             DT_Session::set('register.User.' . $userIndex . '.user_id', $my->id);
         }
         $tableUser = $this->getModel('user')->table;
         DT_Session::set('register.User.' . $userIndex . '.confirmNum', $tableUser->generateconfirmNum());
         $status = DT_Session::get('register.User.' . $userIndex . '.status');
         if ($status == -2) {
             // free or waiting $paying_amount <= 0
             if ($status == -2) {
                 DT_Session::set('register.User.' . $userIndex . '.fee.paid_amount', 0);
                 DT_Session::set('register.User.' . $userIndex . '.fee.paying_amount', 0);
                 $task = "waiting_msg";
             } else {
                 $task = "freethanks";
             }
             $tableUser->register(DT_Session::get('register.User.' . $userIndex));
             DT_Session::set('register.User.' . $userIndex . '.userId', $tableUser->userId);
             $mainframe->redirect("index.php?option=com_dtregister&controller=message&task={$task}&Itemid=" . $Itemid);
         } else {
             $mainframe->redirect("index.php?option=com_dtregister&controller=event&task=viewCart&Itemid=" . $Itemid);
         }
     }
     $eventId = JRequest::getVar('eventId', DT_Session::get('register.Event.eventId'));
     $event =& DtrTable::getInstance('Event', 'Table');
     $event->load($eventId);
     if (isset($_REQUEST['Field'])) {
         // pr('register.User.'.$userIndex.'.fields') ;
         DT_Session::set('register.User.' . $userIndex . '.fields', $_REQUEST['Field']);
         if (isset($_REQUEST['username'])) {
             DT_Session::set('register.User.' . $userIndex . '.username', $_REQUEST['username']);
             DT_Session::set('register.User.' . $userIndex . '.password', $_REQUEST['password']);
         }
         if (isset($_REQUEST['discount_code']) && $_REQUEST['discount_code'] != "") {
             $discount_code_id = $event->validate_code($_REQUEST['discount_code']);
             if ($discount_code_id !== false) {
                 DT_Session::set('register.User.' . $userIndex . '.discount_code_id', $discount_code_id);
             } else {
                 DT_Session::set('register.User.' . $userIndex . '.discount_code_id', false);
                 $this->view->assign('discountCodeError', $event->TableEventdiscountcode->TableDiscountcode->error);
             }
         }
     }
     $userIndex = DT_Session::get('register.Setting.current.userIndex');
     DT_Session::set('register.User.' . $userIndex . '.eventId', $eventId);
     $fieldtype = $this->getModel('fieldtype');
     $viewMemFields = "";
     if (DT_Session::get('register.User.' . $userIndex . '.type') == 'G') {
         $back = JRoute::_("index.php?option=com_dtregister&Itemid=" . $Itemid . "&eventId=" . $eventId . "&controller=event&task=billinginfo&back=1", $xhtml_url);
         $type = 'B';
         $members = DT_Session::get('register.User.' . $userIndex . '.members');
         if ($members) {
             foreach ($members as $key => $member) {
                 $viewMemFields .= "<tr><td colspan='2'>&nbsp;</td></tr><tr><td colspan='3'><u>" . JText::_('DT_MEMBER') . ($key + 1) . " </u></td></tr>";
                 $viewMemFields .= $event->viewFields('M', DT_Session::get('register.User.' . $userIndex . '.members.' . $key), false, 'frmcart', false);
             }
         }
     } else {
         $back = JRoute::_("index.php?option=com_dtregister&Itemid=" . $Itemid . "&eventId=" . $eventId . "&controller=event&task=individualRegister&back=1", $xhtml_url);
         $type = 'I';
     }
     $TableUser =& DtrTable::getInstance('Duser', 'Table');
     $TableUser->create(DT_Session::get('register.User.' . $userIndex));
     $feeObj = new DT_Fee($event, $TableUser);
     $feeObj->getFee($my->id);
     $feesession = $feeObj;
     unset($feesession->TableEvent);
     unset($feesession->TableUser);
     if ($event->is_waiting()) {
         DT_Session::set('register.User.' . $userIndex . '.status', -2);
         $this->view->assign('paying_amount', 0);
     } else {
         $this->view->assign('paying_amount', $feeObj->paid_fee);
     }
     $temp_feesession = clone $feesession;
     //DTrCommon::objectToArray($temp_feesession);
     DT_Session::set('register.User.' . $userIndex . '.fee', DTrCommon::objectToArray($temp_feesession));
     $this->view->assign('feeObj', $feeObj);
     $this->view->assign('back', $back);
     $this->view->assign('eventId', $eventId);
     $this->view->assign('header_eventId', $eventId);
     //$event->load($eventId);
     $this->view->assign('viewFields', $event->viewFields($type, DT_Session::get('register.User.' . $userIndex), false, 'frmcart', false));
     $this->view->assign('viewMemFields', $viewMemFields);
     $this->view->assign('event', $event);
     $this->view->setLayout('confirm');
     $this->view->display();
     // $db = &JFactory::getDBO();
     // $db->profileData = array();
 }
Exemplo n.º 20
0
 function saveAll_migration($data)
 {
     parent::saveAll($data);
 }
Exemplo n.º 21
0
 function billing()
 {
     global $mainframe;
     if (isset($_POST['formsubmit'])) {
         $data = JRequest::getVar('User', array(), null, 'array');
         $data['fields'] = JRequest::getVar('Field', array(), null, 'array');
         $eventId = $data['eventId'];
         $event =& DtrTable::getInstance('Event', 'Table');
         $event->load($eventId);
         if (isset($data['discount_code']) && $data['discount_code'] != "") {
             $discount_code_id = $event->validate_code($data['discount_code']);
             unset($data['discount_code']);
             if ($discount_code_id !== false) {
                 $data['discount_code_id'] = $discount_code_id;
             } else {
                 $data['discount_code_id'] = false;
                 $this->view->assign('discountCodeError', $event->TableEventdiscountcode->TableDiscountcode->error);
             }
         }
         $data = array_merge(DT_Session::get('register.User'), array_filter($data));
         $TableUser =& DtrTable::getInstance('Duser', 'Table');
         $TableUser->create($data);
         $feeObj = new DT_Fee($event, $TableUser);
         $feeObj->getFee($data['user_id'] == "" ? false : true);
         $feeObj->setPaidMethod($data['Fee']['payment_method']);
         $feeObj->setPaidAmount($data['Fee']['paid_amount']);
         $feeObj->setPaidStatus($data['Fee']['status']);
         $fee = $feeObj;
         unset($fee->TableEvent);
         unset($fee->TableUser);
         $data['fee'] = (array) $fee;
         $confirmNum = $TableUser->generateconfirmNum();
         $data['confirmNum'] = $confirmNum;
         $TableUser->register($data);
         DT_Session::clear('register');
         $mainframe->redirect("index.php?option=com_dtregister&controller=user&task=index");
     }
     JToolBarHelper::save('billing', JText::_('DT_SAVE'));
     $mUser = $this->getModel('user');
     $tUser = $mUser->table;
     $eventId = DT_Session::get('register.User.eventId');
     $memtot = DT_Session::get('register.User.memtot');
     $tUser->TableEvent->load($eventId);
     $this->view->assign('form', $tUser->TableEvent->form('B', array(), false, 'adminForm', false));
     $this->view->assign('mUser', $mUser);
     $this->view->assign('eventId', $eventId);
     $this->view->assign('type', 'G');
     $this->view->assign('memtot', $memtot);
     $this->view->setLayout('add');
     $this->view->display();
 }
Exemplo n.º 22
0
 function delete()
 {
     echo "<br />" . ($sql = "Delete From #__dtregister_field_event Where field_id=" . $this->id);
     //$database->setQuery($sql);
     //$database->query();
     $arrNotDelete = array('firstname', 'lastname', 'email');
     if (in_array($this->name, $arrNotDelete)) {
         $this->error = JText::_('DT_COMPULSARY_FIELD');
         return false;
     } else {
         parent::delete();
     }
     return true;
 }
Exemplo n.º 23
0
    function getConditonField()
    {
        global $mainframe;
        $document =& JFactory::getDocument();
        if (isset($document->_script["text/javascript"])) {
            unset($document->_script["text/javascript"]);
        }
        $field = $this->getModel('field')->table;
        $field->load(JRequest::getVar('field_id', 0));
        $childs = $field->getchild($published = 1);
        $selectionindex = JRequest::getVar('selection', '');
        $not_remove = JRequest::getVar('not_remove', array());
        if (!is_array($not_remove)) {
            $not_remove = array($not_remove);
        }
        if ($field->type == 1) {
            $selectionindex--;
        }
        $elements = array();
        // $event = new Event(JRequest::getVar('eventId',0));
        $childjs = "";
        $user = unserialize(base64_decode(JRequest::getVar('obj', '')));
        $eventId = JRequest::getVar('eventId', '');
        $event = DtrTable::getInstance('event', 'Table');
        $event->load($eventId);
        ///$evt_fields = $event->getAllFields();
        $remove_elements = array();
        $ordering = array();
        require_once JPATH_COMPONENT . "/views/field/view.html.php";
        $fieldView = new DtregisterViewField(array());
        if (is_array($fieldView->_path['template'])) {
            foreach ($fieldView->_path['template'] as $path) {
                if (file_exists($path)) {
                    $basepath = $path;
                    break;
                }
            }
        }
        if (is_array($childs)) {
            foreach ($childs as $key => $child) {
                $selection = explode('|', $child->selection_values);
                $ordering[$child->id] = $child->ordering;
                $selectionindex;
                $fieldType = DtrModel::getInstance('Fieldtype', 'DtregisterModel');
                $fieldTypes = $fieldType->getTypes();
                if (in_array($selectionindex, $selection)) {
                    $class = "Field_" . $fieldTypes[$child->type];
                    $childObj = new $class();
                    $childObj->load($child->id);
                    //if(isset($evt_fields[$child->id])){
                    //$child->required = $evt_fields[$child->id]->required ;
                    //}
                    $file = $basepath . "field_" . $fieldTypes[$child->type] . ".php";
                    if (!file_exists($file)) {
                        $file = $basepath . "default.php";
                    }
                    $child->label = stripslashes($child->label) . ":";
                    if ($child->required) {
                        $child->label = $child->label . " <span class='dtrequired'>&nbsp;&nbsp;*&nbsp;&nbsp;</span> ";
                    }
                    $tpl = file_get_contents($file);
                    $constants = array('[label]', '[value]', '[description]');
                    $description = trim($child->description) != "" ? JHTML::tooltip($child->description, '', 'tooltip.png', '', '') : '';
                    $replace = array($child->label, $childObj->formhtml($user, $event, 'adminForm', true), $description);
                    $childjs .= $childObj->childJs;
                    $elements[$child->id] = str_replace($constants, $replace, $tpl);
                } else {
                    $remove = true;
                    if (is_array($selection)) {
                        foreach ($selection as $val) {
                            if (in_array($val, $not_remove)) {
                                $remove = false;
                                break;
                            }
                        }
                    }
                    if ($remove) {
                        $remove_elements[$child->id] = $child->id;
                    }
                }
            }
        }
        $temp = $remove_elements;
        foreach ($remove_elements as $remove_element) {
            $rChilds = array();
            $field->findtree($remove_element, $rChilds);
            foreach ($rChilds as $rchild) {
                if (!in_array($rchild->id, array_keys($elements))) {
                    $temp[$rchild->id] = $rchild->id;
                }
            }
        }
        $remove_elements = $temp;
        ob_start();
        ?>

	 var elements = <?php 
        echo json_encode($elements);
        ?>
;

	 var remove_elements = <?php 
        echo json_encode($remove_elements);
        ?>
;

     var ordering = <?php 
        echo json_encode($ordering);
        ?>
;

     <?php 
        echo $childjs;
        echo chr(13);
        if (isset($document->_script["text/javascript"])) {
            echo $document->_script['text/javascript'];
        }
        $data = ob_get_clean();
        echo str_replace("\n", ' ', $data) . "/*DTendScript*/";
        die;
    }
Exemplo n.º 24
0
 function __construct(&$db = null)
 {
     $db =& JFactory::getDBO();
     $this->db = $db;
     parent::__construct('#__dtregister_locations', 'id', $db);
 }
Exemplo n.º 25
0
 function saveAll($data)
 {
     $config_data = array();
     if (is_array($data)) {
         foreach ($data as $key => &$value) {
             if (is_array($value)) {
                 $value = implode(",", $value);
             }
             $config_data[] = array('key' => $key, 'value' => $value);
         }
     }
     pr($config_data);
     parent::saveAll($config_data);
 }
Exemplo n.º 26
0
 function confirm()
 {
     global $Itemid, $mainframe, $xhtml, $xhtml_url;
     $this->view->setModel($this->getModel('field'));
     $this->view->setModel($this->getModel('fieldtype'));
     $step = JRequest::getVar('step', 0);
     if ($step === "confirm") {
         if (isset($_REQUEST['partial_payment'])) {
             if ($_REQUEST['partial_payment'] == 'full') {
                 $paying_amount = JRequest::getVar('paying_amount', 0);
             } else {
                 $paying_amount = JRequest::getVar('partial_payment_amount', 0);
             }
         } else {
             $paying_amount = JRequest::getVar('paying_amount', 0);
         }
         if ($paying_amount > 0) {
             $paid_amount = DT_Session::get('register.User.fee.paid_amount') + $paying_amount;
         } else {
             $paid_amount = DT_Session::get('register.User.fee.paid_amount');
         }
         if (DT_Session::get('register.User.0') === false) {
             DT_Session::set('register.User.fee.paying_amount', $paying_amount);
             DT_Session::set('register.User.fee.paid_amount', $paid_amount);
             $user = DT_Session::get('register.User');
             DT_Session::clear('register.User');
             DT_Session::set('register.User.process', $user['process']);
             unset($user['process']);
             DT_Session::set('register.User.0', $user);
         } else {
         }
         $paymethod = DT_Session::get('register.payment.method');
         if ($paying_amount <= 0) {
             $function = DT_Session::get('register.User.process');
             $tableUser = $this->getModel('user')->table;
             $tableUser->{$function}(DT_Session::get('register'));
             $messageTask = $function;
             $mainframe->redirect("index.php?option=com_dtregister&controller=message&Itemid={$Itemid}&task=" . $messageTask);
         } else {
             $mainframe->redirect(JRoute::_("index.php?option=com_dtregister&controller=payment&task=methods", $xhtml_url));
         }
     }
     $eventId = JRequest::getVar('eventId', DT_Session::get('register.User.eventId'));
     $this->view->assign('header_eventId', $eventId);
     $event =& DtrTable::getInstance('Event', 'Table');
     $event->load($eventId);
     $fieldtype = $this->getModel('fieldtype');
     $viewMemFields = "";
     if (DT_Session::get('register.User.type') == 'G') {
         $back = JRoute::_("index.php?option=com_dtregister&Itemid=" . $Itemid . "&eventId=" . $eventId . "&controller=user&task=edit&back=1&userId=" . DT_Session::get('register.User.userId'));
         $type = 'B';
         $members = DT_Session::get('register.User.members');
         $i = 0;
         if (is_array($members)) {
             foreach ($members as $key => $member) {
                 $viewMemFields .= "<tr><td colspan='2'>&nbsp;</td></tr><tr><td colspan='3'><u>" . JText::_('DT_MEMBER') . ($i + 1) . " </u></td></tr>";
                 $viewMemFields .= $event->viewFields('M', DT_Session::get('register.User.members.' . $key), false, 'frmcart', false);
                 $i++;
             }
         }
     } else {
         $back = JRoute::_("index.php?option=com_dtregister&Itemid=" . $Itemid . "&eventId=" . $eventId . "&controller=user&task=edit&back=1&userId=" . DT_Session::get('register.User.userId'));
         $type = 'I';
     }
     $TableUser =& DtrTable::getInstance('Duser', 'Table');
     $TableUser->create(DT_Session::get('register.User'));
     $feeObj = new DT_Fee($event, $TableUser);
     $feeObj->setPaidAmount(DT_Session::get('register.User.fee.paid_amount'));
     $feeObj->getFee(false);
     $feesession = $feeObj;
     unset($feesession->TableEvent);
     unset($feesession->TableUser);
     DT_Session::set('register.User.fee', (array) $feesession);
     $this->view->assign('feeObj', $feeObj);
     $this->view->assign('back', $back);
     $this->view->assign('eventId', $eventId);
     $event->load($eventId);
     $this->view->assign('viewFields', $event->viewFields($type, DT_Session::get('register.User'), false, 'frmcart', false));
     $this->view->assign('viewMemFields', $viewMemFields);
     $this->view->assign('partial_payment_enable', $event->partial_payment_enable);
     $this->display();
 }
Exemplo n.º 27
0
 function store()
 {
     if (isset($this->feeElements)) {
         $temp = $this->feeElements;
         unset($this->feeElements);
     }
     parent::store();
     if (isset($temp)) {
         $this->feeElements = $temp;
     }
 }
Exemplo n.º 28
0
<?php

/**
* @version 2.7.0
* @package Joomla 1.5
* @subpackage DT Register
* @copyright Copyright (C) 2006 DTH Development
* @copyright contact dthdev@dthdevelopment.com
* @license Commercial
*/
global $Itemid, $xhtml;
// pr(DT_Session::get('register.User'));
$events = array();
$html = "";
foreach (DT_Session::get('register.User') as $key => $registration) {
    $eventTable = DtrTable::getInstance('event', 'Table');
    if (!isset($events[$registration['eventId']])) {
        $eventTable->load($registration['eventId']);
        $events[$registration['eventId']] = $eventTable;
    }
    if (isset($registration['remove']) && $registration['remove'] == 1) {
        continue;
    }
    if (!isset($registration['confirmed']) || $registration['confirmed'] != 1) {
        continue;
    }
    $event = $events[$registration['eventId']];
    $this->assign('index', $key);
    $this->assign('event', $event);
    $this->assign('registration', $registration);
    $html .= $this->loadTemplate('row');
Exemplo n.º 29
0
 function save($data)
 {
     if (isset($data['userId'])) {
         $row = $this->findByUserId($data['userId'], false);
         if ($row) {
             $data['id'] = $row->id;
         }
     }
     $cryptastic = new cryptastic();
     $data['x_card_num'] = $cryptastic->encrypt($data['x_card_num'], $data['firstname']);
     // or   die("Failed to complete encryption.");
     parent::save($data);
 }