Beispiel #1
0
 function getConsltantGigs()
 {
     $FC = new FusionCharts();
     $user = getLoginUserDetail();
     $totalGigs = $this->consultants->getGraphGigs($user->bandBrand);
     $gigsByMonth = array();
     foreach ($totalGigs as $tg) {
         $marr = explode("-", $tg->depositPaidDate);
         $gigsByMonth[$marr[1]][] = $tg;
     }
     $monthsArr = array("1" => "Jan", "2" => "Feb", "3" => "Mar", "4" => "Apr", "5" => "May", "6" => "Jun", "7" => "Jul", "8" => "Aug", "9" => "Sep", "10" => "Oct", "11" => "Nov", "12" => "Dec");
     // specify the graph parameters
     $strParam = "caption=Deposits Paid - Monthly ;xAxisName=Month;yAxisName=Total gigs;decimalPrecision=0;formatNumberScale=1";
     $FC->setChartParams($strParam);
     for ($i = 1; $i <= 12; $i++) {
         $total = isset($gigsByMonth[$i]) ? count($gigsByMonth[$i]) : 0;
         $FC->addChartData($total, "name=" . $monthsArr[$i]);
     }
     // output the FusionCharts XML
     print $FC->getXML();
 }
    ?>
musician/sendLoginDetail/<?php 
    echo $musicians->id;
    ?>
" id="musicianSendLoginBtn" >Send Login</a>
				<img id='sendlogin_process_btn' style="display:none;margin:5px 5px 0 0" class="fright" src="<?php 
    echo getImage('ajax-loader.gif');
    ?>
" />
			<?php 
}
?>
			<div class="clear"></div>
			<br />
		<?php 
$user = getLoginUserDetail();
$hidden = array();
$lsarr = array('name' => 'lead_singer', 'id' => 'lead_singer', 'value' => '1');
$gstarr = array('name' => 'gst', 'id' => 'gst', 'value' => '1');
if (isset($musicians)) {
    $hidden['musicianId'] = $musicians->id;
    if ($musicians->lead_singer) {
        $lsarr['checked'] = 'checked';
    }
    if ($musicians->gst) {
        $gstarr['checked'] = 'checked';
    }
}
echo form_open(my_site_url() . 'musician/musicians/save', array('id' => 'add_edit_musician_form', 'name' => 'add_edit_musician_form'), $hidden);
?>
				<div class="row">
Beispiel #3
0
				<img style="<?php 
if (!$searchkey) {
    echo "display:none;";
}
?>
" id='cclearsearch' src="<?php 
echo getImage('icon_cross.png');
?>
" />
			</form>
			</div>
			<?php 
if (isLoggedIn()) {
    ?>
				<h2 width: auto;"><?php 
    echo getLoginUserDetail()->firstName;
    ?>
's Home Page </h2>
			<?php 
}
?>
			<span></span>
			<span style="position: absolute;right: 0;top: 10px;width: auto;">
				  <a   class='btn fright' href="<?php 
echo my_site_url();
?>
consultant/addShowcase" >ADD SHOWCASE</a></span>
			<div class="clear"></div>
		</div>
		<div id="result"></div>
		<div id="inquiry_list" class='block' style="padding:2px;">
Beispiel #4
0
 function saveEventComment($postdata)
 {
     $user = getLoginUserDetail();
     $data = array('from' => $user->uid, 'musician' => $postdata['musicianId'], 'event' => $postdata['eventId'], 'comment' => $postdata['event_comment']);
     $res = $this->db->insert('event_comments', $data);
     if ($res) {
         return true;
     } else {
         return false;
     }
 }
Beispiel #5
0
 function musicianhome()
 {
     $user = getLoginUserDetail();
     $data['activeMenu'] = '/musician/musicians';
     $data['title'] = 'CLUB BAND::' . $user->first_name . '\'s home(musician)';
     $uri = $this->uri->segment_array();
     $action = isset($uri[3]) ? $uri[3] : '';
     $postdata = $this->input->post();
     if (isset($postdata['action'])) {
         if ($this->consultants->acceptDeclineEvent($postdata)) {
             $resp['process'] = 'success';
             $resp['msg'] = 'Action performed successfully';
         } else {
             $resp['process'] = 'fail';
             $resp['msg'] = 'There is problem to performed action';
         }
         echo json_encode($resp);
         die;
     } else {
         if ($action == 'editinfo') {
             $data['heading'] = 'Update Info';
             $data['musicians'] = $this->consultants->getData('musician', array('id' => $user->id));
             $this->load->view('musician/editinfo', $data);
         } else {
             if ($action == 'saveinfo') {
                 $postData = $this->input->post();
                 // validation rules
                 $config = array(array('field' => 'first_name', 'label' => 'first Name', 'rules' => 'trim|required'), array('field' => 'last_name', 'label' => 'Last Name', 'rules' => 'trim|required'), array('field' => 'mobile', 'label' => 'Mobile No', 'rules' => 'trim|required|numeric'), array('field' => 'email', 'label' => 'Email', 'rules' => 'trim|required|valid_email'), array('field' => 'instrument_1', 'label' => 'Main instrument', 'rules' => 'trim|required'), array('field' => 'instrument_2', 'label' => 'Second instrument', 'rules' => 'trim|required'), array('field' => 'instrument_3', 'label' => 'Third instrument', 'rules' => 'trim|required'));
                 $this->form_validation->set_rules($config);
                 $messages = array('required' => 'You missed %s', 'numeric' => '%s must be numeric', 'valid_url' => 'Enter valid %s');
                 $this->form_validation->set_message($messages);
                 if ($this->form_validation->run() == FALSE) {
                     $errors = $this->form_validation->error_array();
                     $resp['process'] = 'fail';
                     $resp['msg'] = $errors[0];
                     $resp['data'] = $postData;
                 } else {
                     $this->consultants->saveMusician($postData);
                     $resp['process'] = 'success';
                     $resp['msg'] = 'Data saved successfully';
                     $resp['data'] = $postData;
                     $this->session->set_userdata(array('msg' => 'Data saved successfully'));
                 }
                 echo json_encode($resp);
                 exit;
             } else {
                 $data['invitations'] = $this->consultants->getInvitationForMusician($user->id);
                 $this->load->view('musician/musicianhome', $data);
             }
         }
     }
 }