Example #1
0
 public function getEnrollmentForm($uid, $tid, $eid, $mem)
 {
     $ret = array('personal' => array(), 'tour' => array(), 'enroll' => array(), 'members' => $mem);
     $p = parent::prepare("SELECT * FROM users " . "INNER JOIN students ON id=stu_user_id " . "AND users.id=" . $uid);
     $p->execute();
     $ret['personal'] = $p->fetchAll();
     $q = new Query();
     $q->where = array('tou_id' => $tid);
     $rest = $q->inner_join('tours', 'paymen_shema', array('tou_id', 'psc_tour_id'));
     $ret['tour'] = $rest[0];
     $q->table = 'enroll_full';
     $q->where = array('enf_id' => $eid);
     $rese = $q->read();
     $ret['enroll'] = $rese[0];
     return $ret;
 }
Example #2
0
 public function drawListModel()
 {
     $post = filter_input_array(INPUT_POST);
     $where = array();
     $mod = array();
     $str = '<ul>';
     if ($post['grupa'] !== '') {
         $where['pro_grupa_id'] = $post['grupa'];
     }
     if ($post['kat'] !== '') {
         $where['pro_kat_id'] = $post['kat'];
     }
     if ($post['potkat'] !== '') {
         $where['pro_potkat_id'] = $post['potkat'];
     }
     if ($post['marka'] !== '') {
         $where['pro_marka_id'] = $post['marka'];
     }
     if ($post['model'] !== '') {
         $where['pro_model_id'] = $post['model'];
     }
     $resm = selection('proizvodi', $where);
     foreach ($resm as $m) {
         array_push($mod, $m['pro_model_id']);
     }
     $mods = array_unique($mod);
     foreach ($mods as $ma) {
         $where['pro_model_id'] = $ma;
         $q = new Query();
         $q->where = $where;
         $resp = $q->inner_join('proizvodi', 'modeli', array('pro_model_id', 'mod_id'));
         $mc = count($resp);
         $str .= '<li class="filmodel" data-mrid="' . $resp[0]['mod_marka_id'] . '" data-moid="' . $resp[0]['mod_id'] . '">' . ucfirst($resp[0]['mod_naziv']) . ' (' . $mc . ')</li>';
     }
     $str .= '</ul>';
     //var_dump($marks);
     echo $str;
 }
Example #3
0
<?php

$q = new Query();
$q->where = array('lea_tour_id' => $data[0]);
$res = $q->inner_join('groupleaders', 'users', array('lea_user_id', 'id'));
?>
<div id="mailtogl-body">
<form action="" method="post" id="mailtogl">
    <p><strong>Recipient : </strong><?php 
echo $res[0]['firstname'] . ' ' . $res[0]['lastname'];
?>
</p>
    <input type="hidden" name="email" value="<?php 
echo $res[0]['email'];
?>
">
    <input type="hidden" name="sender" value="<?php 
echo $data[1]['firstname'] . ' ' . $data[1]['lastname'];
?>
">
    <input type="hidden" name="senderemail" value="<?php 
echo $data[1]['email'];
?>
">
    <label>Subject</label>
    <input type="text" name="subject" class="form-control" required="">
    <label>Message</label>
    <textarea name="message" rows="10" class="form-control" required=""></textarea>
    <hr>
    <input type="submit" value="SEND MAIL" class="btn btn-primary">
</form>