Example #1
0
	<div id="content_body">
			
			<div class="content_block block">
				<?php 
echo $welcomeMsg;
?>
			</div>
			<div class="sidebar_right block">
				<h2>Band Enquiry Form!</h2>
				<div id="formmsg" ></div>
			
			<?php 
echo form_open(my_site_url() . '/welcome/saveEnquiry', array('id' => 'bandenqfrm'), array('action' => 'enquiry'));
?>
				<div class="row">
					<div class="colauto">
						<input type="radio"  name='bandbrand' value="Radio Club Band" />
						<span>Radio Club Band</span>
					</div>
					<div class="colauto hspace10">
						<input type="radio"  name='bandbrand' value="Press Club Band"  />
						<span>Press Club Band</span>
					</div>
					<div class="clear"></div>
				</div>
				<div class="row">
					<div class="colauto">
						<?php 
echo form_input(array('name' => 'firstName', 'id' => 'firstName', 'placeholder' => "First Name"));
?>
					</div>
Example #2
0
 function saveEnquiry()
 {
     if (!$this->input->post()) {
         redirect(my_site_url() . '/welcome');
     }
     $postData = $this->input->post();
     // validation rules
     $config = array(array('field' => 'bandbrand', 'label' => 'Band Brand', 'rules' => 'required'), array('field' => 'firstName', 'label' => 'First Name', 'rules' => 'trim|required|alpha_numeric'), array('field' => 'lastName', 'label' => 'Last Name', 'rules' => 'trim|required|alpha_numeric'), array('field' => 'email', 'label' => 'Email', 'rules' => 'trim|required|valid_email'), array('field' => 'mobile', 'label' => 'Mobile', 'rules' => 'trim|required|numeric'), array('field' => 'venueLocation', 'label' => 'Venue Location', 'rules' => 'trim|required'), array('field' => 'eventDate', 'label' => 'Event Date', 'rules' => 'trim|required'), array('field' => 'eventType', 'label' => 'Enquiry Type', 'rules' => 'trim|required'));
     $this->form_validation->set_rules($config);
     $messages = array('required' => 'You missed %s', 'alpha_numeric' => '%s must be alpha numeric', 'valid_email' => 'Invalid email address', 'numeric' => '%s must be numeric');
     $this->form_validation->set_message($messages);
     if ($this->form_validation->run() == FALSE) {
         $errors = $this->form_validation->error_array();
         //print_r($errors);
         $resp['process'] = 'fail';
         $resp['msg'] = '<h2>Error!</h2>' . $errors[0];
         $resp['data'] = $postData;
     } else {
         $data = array('bandBrand' => $postData['bandbrand'], 'eventType' => $postData['eventType'], 'firstName' => $postData['firstName'], 'lastName' => $postData['lastName'], 'eventDate' => $postData['eventDate'], 'email' => $postData['email'], 'mobile' => $postData['mobile'], 'venue' => $postData['venueLocation']);
         if (isset($postData['freeCD'])) {
             $data['freeCD'] = $postData['freeCD'];
         }
         $id = commonInsert('eventBookings', $data);
         $postData['id'] = $id;
         $resp['process'] = 'success';
         $resp['msg'] = '<h2>Thank You</h2>We will reply to your enquiry promptly.';
         $resp['data'] = $postData;
     }
     echo json_encode($resp);
 }
Example #3
0
 public function emailtemplates()
 {
     $uri = $this->uri->segment_array();
     $action = isset($uri[3]) ? $uri[3] : '';
     $etId = isset($uri[4]) ? $uri[4] : '';
     $status = isset($uri[5]) ? $uri[5] : '';
     $data['activeMenu'] = '/secure/emailtemplates';
     $data['title'] = 'CLUB BAND::Email Templates';
     /*if (!$this->acl->has_permission($this->uri->segment(2))){
     			$this->load->view('common/access_denied',$data);
     			
     		}else */
     if ($action == 'add') {
         $this->load->view('emailtemplates_add_edit', $data);
     } else {
         if ($action == 'edit') {
             if ($etId) {
                 $data['etId'] = $etId;
                 $data['data'] = $this->secure->getEmailTemplateById($etId);
                 $this->load->view('emailtemplates_add_edit', $data);
             } else {
                 $this->session->set_userdata(array('error' => 'There is some problem to edit record'));
                 redirect(my_site_url() . 'secure/emailtemplates');
             }
         } else {
             if ($action == 'status') {
                 if ($etId && $status != '') {
                     $data['data'] = $this->secure->changeEmailTemplateStatusById($etId, $status);
                     $this->session->set_userdata(array('message' => 'Email Template\'s status changed successfully'));
                 } else {
                     $this->session->set_userdata(array('error' => 'No valid parameter found'));
                 }
                 redirect(my_site_url() . 'secure/emailtemplates');
             } else {
                 if ($action == 'setDefault') {
                     if ($etId) {
                         $data['data'] = $this->secure->setDefaultEmailTemplate($etId);
                         $this->session->set_userdata(array('message' => 'Set default template successfully done.'));
                     } else {
                         $this->session->set_userdata(array('error' => 'No valid parameter found'));
                     }
                     redirect(my_site_url() . 'secure/emailtemplates');
                 } else {
                     if ($action == 'delete' && 1 == 2) {
                         if ($etId) {
                             $data['etId'] = $etId;
                             if ($this->secure->deleteEmailTemplateById($etId)) {
                                 $this->session->set_userdata(array('message' => 'Record deleted successfully'));
                             } else {
                                 $this->session->set_userdata(array('error' => 'Problem to delete record'));
                             }
                         } else {
                             $this->session->set_userdata(array('error' => 'Record not found'));
                         }
                         redirect(my_site_url() . 'secure/emailtemplates');
                     } else {
                         if ($action == 'save') {
                             $postData = $this->input->post();
                             if ($this->secure->saveEmailTemplate($postData)) {
                                 $this->session->set_userdata(array('message' => 'Email template saved successfully'));
                                 redirect(my_site_url() . 'secure/emailtemplates');
                             } else {
                                 $data['error'] = 'Please fill all the fields with valid data';
                                 $data['data'] = $postData;
                                 $this->load->view('emailtemplates_add_edit', $data);
                             }
                         } else {
                             $data['emailtemplates'] = $this->secure->getEmailTemplates();
                             $this->load->view('emailtemplates_list', $data);
                         }
                     }
                 }
             }
         }
     }
 }
Example #4
0
		showDeselectButton: true,
		showCloseButton: true,
		showLeadingZero: true
	});
});
</script>
<script language="javascript" type="text/javascript" src="<?php 
echo base_url();
?>
assets/tiny_mce/tiny_mce.js"></script>
	<div id="content_body">
		<div id="consultant_EB" class="block" >
						
				
				<form name="event_generalinfo_form" id="showcase_inforForm" method="post" action="<?php 
echo my_site_url();
?>
consultant/saveShowcase" >
					<div class="row2">
							<span class="b">General Information</span>&nbsp;&nbsp;&nbsp;
							<input type="hidden" value="<?php 
echo $user->firstName;
?>
" name="username"/>
							<input type="hidden" value="<?php 
echo $user->bandBrand;
?>
" name="bandbrand"/>
                                                         <input type="button" class="btn save_showcaseInfo"  name="event_generalinfo_save" id="showcase_imf" value="Save" />&nbsp;&nbsp;&nbsp;
							<input type="button" class="btn save_showcaseInfo"  name="event_generalinfo_savenhome" id="save_home" value="Save & Home" />
							<input type="hidden" name="gotohome" id="showgohome" value="0" />
			<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">
					<div class="col2x2_2" style="width:50%">
						
                        <?php 
echo form_checkbox($lsarr);
?>
						<label for="lead_singer">Lead singer? </label>
					</div>
                    <div class="col2x2_2" style="width:50%">
						
                       <?php 
echo form_checkbox($gstarr);
?>
					   <label for="gst">GST Registered? </label>
Example #6
0
    echo $m->email;
    ?>
 </div>&nbsp;
                <div class="fleft  wp10 center"><?php 
    if ($m->lead_singer == '1') {
        echo 'Yes';
    } else {
        echo 'No';
    }
    ?>
 </div>
				<div class="fleft wp10"><a class="course_action fleft" href="<?php 
    echo my_site_url('musician/musicians/edit/') . $m->id;
    ?>
" > Edit/</a>  <a class="fleft deleterecord" href="<?php 
    echo my_site_url('musician/musicians/delete/') . $m->id;
    ?>
" > Delete </a></div>
				<div class="clear"></div>
			</div>
			
		<?php 
}
?>
<script type="text/javascript">
	$(document).ready(function(){
jQuery(function() {
		jQuery( "#availDate" ).datepicker({minDate: new Date(),dateFormat: "mm/dd/yy" });
	});
	$('#availDate').change(function() {
	   var searchDate = $(this).attr('value');
Example #7
0
            if ($user->role == '2') {
                echo '<a href="' . my_site_url() . 'consultant" class="">Home</a> &nbsp;&nbsp;|&nbsp;&nbsp; ';
            } else {
                if ($user->role == '4') {
                    echo '<a href="' . my_site_url() . 'musician/musicianhome" class="">Home</a> &nbsp;&nbsp;|&nbsp;&nbsp; ';
                    echo '<a href="' . my_site_url() . 'musician/musicianhome/editinfo" id="musicianeditinfobtn">Update Personal Info</a> &nbsp;&nbsp;|&nbsp;&nbsp; ';
                }
            }
        }
        if ($user->role == '1' || $user->role == '2') {
            echo '<a href="' . my_site_url() . 'musician" class="">Musicians</a> &nbsp;&nbsp;|&nbsp;&nbsp; ';
            echo '<a href="' . my_site_url() . 'secure/emailtemplates" class="">Email Templates</a> &nbsp;&nbsp;|&nbsp;&nbsp; ';
        }
        echo '<a href="' . my_site_url() . 'secure/logout" class="">Logout</a>';
    } else {
        echo '<a href="' . my_site_url() . 'welcome/login" class="">Login</a>';
    }
}
?>
		</div>
	</div>
	<div id="mainmenu">
			<nav class="horizontal-nav full-width">
				<?php 
//print_r($this->menu->render(getMenuItems(), $activeMenu, NULL, 'basic'));
?>
			
				
			</nav>
			<div class="clear"></div>
	</div>
Example #8
0
 function saveShowcase()
 {
     $this->load->helper('form');
     $this->load->library('form_validation');
     $postData = $this->input->post();
     // validation rules
     $config = array();
     $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 (count($config) > 0 && $this->form_validation->run() == FALSE) {
         $errors = $this->form_validation->error_array();
         $resp['process'] = 'fail';
         $resp['msg'] = $errors[0];
         //$resp['data'] = $postData;
     } else {
         $this->consultants->saveShowcase($postData);
         $resp['process'] = 'success';
         $resp['msg'] = 'Data saved successfully';
         //$resp['data'] = $postData;
         $this->session->set_userdata(array('msg' => 'Data saved successfully'));
     }
     if ($postData['gotohome'] == '1') {
         redirect(my_site_url() . 'consultant/');
     } else {
         echo json_encode($resp);
         exit;
     }
 }
Example #9
0
			<div class="clear"></div>
			<br />
		<?php 
$hidden = array();
if (isset($musicians)) {
    $hidden['musicianId'] = $musicians->id;
}
$lsarr = array('name' => 'lead_singer', 'id' => 'lead_singer', 'value' => '1');
if ($musicians->lead_singer) {
    $lsarr['checked'] = 'checked';
}
$gstarr = array('name' => 'gst', 'id' => 'gst', 'value' => '1');
if ($musicians->gst) {
    $gstarr['checked'] = 'checked';
}
echo form_open(my_site_url() . 'musician/musicianhome/saveinfo', array('id' => 'editinfo_form', 'name' => 'editinfo_form'), $hidden);
?>
				<div class="row">
					<div class="col2x2_2" style="width:33%">
						<label for="lead_singer">Lead singer: </label>
                        <?php 
echo form_checkbox($lsarr);
?>
					</div>
                    <div class="col2x2_2" style="width:33%">
						<label for="gst">GST Registered? </label>
                       <?php 
echo form_checkbox($gstarr);
?>
					</div>
					<!--div class="col2x2_2" style="width:50%" >
Example #10
0
 function sendLoginDetail()
 {
     $data['activeMenu'] = '/musician/musicians';
     $data['title'] = 'Admin App::Musician';
     $resp = array();
     $uri = $this->uri->segment_array();
     $musicianId = isset($uri[3]) ? $uri[3] : '';
     $config['protocol'] = 'mail';
     $config['wordwrap'] = FALSE;
     $config['mailtype'] = 'html';
     $config['charset'] = 'utf-8';
     $config['crlf'] = "\r\n";
     $config['newline'] = "\r\n";
     $this->load->library('email', $config);
     $this->email->from('*****@*****.**', 'Login Detail::CLUB BAND');
     $msgbody = '';
     if ($musicianId) {
         $musicianData = $this->consultants->getData('musician', array('id' => $musicianId));
         $this->email->to($musicianData->email, $musicianData->first_name);
         $this->email->subject("Login Detail of CLUB BAND!");
         if (!$musicianData->uid || $musicianData->uid == 0) {
             $ranuname = generateRandom(10);
             $ranpass = generateRandom(mt_rand(6, 15), 'password');
             $musicianData->username = $ranuname;
             $musicianData->password = $ranpass;
             if ($this->consultants->updateMusicianData($musicianData)) {
                 $msgbody .= 'Hi ' . $musicianData->first_name . ' ' . $musicianData->last_name . ',<br />';
                 $msgbody .= 'Here is you login credential for club band site. <br />';
                 $msgbody .= 'Username: '******' <br />';
                 $msgbody .= 'Password: '******' <br />';
                 $msgbody .= 'Please login on clubband using folloing url and see your activities.<br />';
                 $msgbody .= 'URL: <a href="' . my_site_url() . '">' . my_site_url() . '</a><br /><br />';
                 $msgbody .= 'Thanks,<br />CLUB BAND Team!';
             } else {
                 $resp['process'] = 'fail';
                 $resp['msg'] = "There is problem to generate username/password. Contact to webmaster";
             }
         } else {
             $msgbody .= 'Hi ' . $musicianData->first_name . ' ' . $musicianData->last_name . ',<br />';
             $msgbody .= 'Here is you login credential for club band site. <br />';
             $msgbody .= 'Username: '******' <br />';
             $msgbody .= 'Password: '******' <br />';
             $msgbody .= 'Please login on clubband using folloing url and see your activities.<br />';
             $msgbody .= 'URL: <a href="' . my_site_url() . '">' . my_site_url() . '</a><br /><br />';
             $msgbody .= 'Thanks,<br />CLUB BAND Team!';
         }
     } else {
         $resp['process'] = 'fail';
         $resp['msg'] = "Musician's data not found";
     }
     if ($msgbody) {
         $this->email->message($msgbody);
         if ($this->email->send()) {
             $resp['process'] = 'success';
             $resp['msg'] = 'Mail sent successfully';
         } else {
             $resp['process'] = 'fail';
             $resp['msg'] = 'There is problem to send mail.';
         }
     }
     echo json_encode($resp);
 }