Пример #1
0
 public function run()
 {
     $faker = Faker::create();
     foreach (range(1, 10) as $index) {
         Officer::create([]);
     }
 }
Пример #2
0
 public function action_emails()
 {
     $view = View::make('admin.emails');
     $view->vendor_emails = Vendor::join('users', 'user_id', '=', 'users.id')->where_null('banned_at')->where('send_emails', '=', true)->lists('email');
     $view->officer_emails = Officer::join('users', 'user_id', '=', 'users.id')->where_null('banned_at')->where('send_emails', '=', true)->lists('email');
     $this->layout->content = $view;
 }
Пример #3
0
 public function pendamping($id)
 {
     $name = Crypt::decrypt($id);
     $thn = date('Y');
     $officers = Officer::where('user_id', $name)->where(DB::raw('YEAR(created_at)'), '=', $thn)->get();
     $school = School::where('user_id', $name)->first();
     return View::make('officers.pendamping', compact('officers'))->withTitle('Atlit')->with('school', $school);
 }
Пример #4
0
 public function action_create()
 {
     $user_input = Input::get('user');
     $user = new User();
     $user->email = $user_input["email"];
     $user->how_hear = $user_input["how_hear"];
     $officer = new Officer(Input::get('officer'));
     if (in_array(strtolower($user->email), Officer::$admin_emails)) {
         $officer->role = Officer::ROLE_SUPER_ADMIN;
     }
     if ($user->validator(false, true)->passes() && $officer->validator()->passes()) {
         $user->save();
         $user->officer()->insert($officer);
         $user->generate_reset_password_token();
         Mailer::send("FinishOfficerRegistration", array("user" => $user));
         return Redirect::to('/')->with('notice', 'Please check your email for a link to finish signup.');
     } else {
         Session::flash('errors', array_merge($user->validator(false, true)->errors->all(), $officer->validator()->errors->all()));
         return Redirect::to_route('new_officers')->with_input();
     }
 }
Пример #5
0
 public static function project($fork_from_project_id)
 {
     $faker = Faker\Factory::create();
     $original_project = Project::find($fork_from_project_id);
     $due_at = new \DateTime();
     $due_at->setTimestamp(rand(1346475600, 1364792400));
     $p = new Project(array('project_type_id' => $original_project->project_type_id, 'title' => self::$project_titles[array_rand(self::$project_titles)], 'agency' => self::$agencies[array_rand(self::$agencies)], 'office' => self::$offices[array_rand(self::$offices)], 'zipcode' => self::$offices[array_rand(self::$zipcodes)], 'background' => $faker->paragraph, 'sections' => $original_project->sections, 'variables' => $original_project->variables, 'deliverables' => $original_project->deliverables, 'proposals_due_at' => $due_at));
     if (rand(0, 1) == 1) {
         $p->public = true;
         $p->recommended = rand(0, 1);
         $p->fork_count = rand(0, 8);
     }
     $p->forked_from_project_id = $original_project->id;
     $p->posted_to_fbo_at = rand(0, 1) == 0 ? new \DateTime() : null;
     $p->save();
     $p->officers()->attach(Officer::first()->id, array('owner' => true));
     return $p;
 }
Пример #6
0
<div class="container">
	<div class="panel panel-primary">
		<div class="panel-heading">
			<div class="row">
				<div class="col-xs-3"><p align="left"><a href="<?php 
echo WEB_ROOT;
?>
admin/index.php?page=2" class="btn btn-info btn-xsm"><span class="glyphicon glyphicon-home"></span>&nbsp;Home</a><p>
				</div>
				
				<div class="col-xs-9">
					<div class="col-xs-8">
						<p ><strong><h5 align="right">
						<?php 
echo $_SESSION['ACCOUNT_FNAME'] . " " . $_SESSION['ACCOUNT_LNAME'];
?>
</h5></strong></p>
					</div>
					<div class="col-xs-4">
						<div class="col-xs-6">
							<p align="left"><a href="<?php 
echo WEB_ROOT;
?>
admin/modules/officer/index.php" class="btn btn-info btn-xsm">
								<span class="glyphicon glyphicon-step-backward"></span>Back
								</a
								</p>
							</div>
							<div class="col-xs-6">
								<p align="right"><a href="<?php 
Пример #7
0
 public function useStrategy(Officer $officer)
 {
     $mp = $officer->getMp() - 5;
     $officer->setMp($mp);
     return '敵方士氣下降 15 點,還剩 ' . $mp . ' 點MP';
 }
Пример #8
0
				  <thead>
				  	<tr>
				  		<th>No.</th>
				  		<th width="15%" align="left"><input type="checkbox" name="chkall" id="chkall" onclick="return checkall('selector[]');">Officer #</th>
						 <th>First Name</th>
                         <th>Last Name</th>

				  		<th>Details</th>
				  	</tr>	
				  </thead>
				  <tbody>
				  	<?php 
//$account_username = $_SESSION['ACCOUNT_USERNAME'];
//$account_password = $_SESSION['ACCOUNT_PASSWORD'];
//if($account_password!= Null) {
$officer = new Officer();
$officerList = $officer->listOfOfficer();
foreach ($officerList as $list) {
    //echo '<tr>';
    echo '<td width="5%" align="center"></td>';
    echo '<td width="15%"><input type="checkbox" name="selector[]" id="selector[]" value="' . $list->officer_id . '"/>';
    echo '<td width="35%" >' . $list->firstname . '</td>';
    echo '<td width="25%" >' . $list->lastname . '</td>';
    echo '<td><a href = "index.php?view=view&officerId=' . $list->officer_id . '" ><span class="glyphicon glyphicon-list-alt"> </span>  View</a></td>';
    echo '</tr>';
}
//}
//}
?>

				  </tbody>
Пример #9
0
//echo "bureau_id = ".$bureau_id;
if (!$bureau_id == "") {
    $officer = new Officer();
    $officerList = $officer->listOfOfficerBureau($bureau_id);
    foreach ($officerList as $list) {
        echo '<tr>';
        echo '<td width="5%" align="center"></td>';
        echo '<td width="15%"><input type="checkbox" name="selector[]" id="selector[]" value="' . $list->officer_id . '"/>';
        echo '<td width="30%" >' . $list->firstname . '</td>';
        echo '<td width="25%" >' . $list->lastname . '</td>';
        echo '<td width="15%" ><a href = "index.php?view=edit&id=' . $list->officer_id . '" ><span class="glyphicon glyphicon-list-alt"> </span>  Edit</a></td>';
        echo '<td><a href = "index.php?view=view&officerId=' . $list->officer_id . '" ><span class="glyphicon glyphicon-list-alt"> </span>  View</a></td>';
        echo '</tr>';
    }
} else {
    $officer = new Officer();
    $officerList = $officer->listOfOfficerSchool($school_id);
    foreach ($officerList as $list) {
        echo '<tr>';
        echo '<td width="5%" align="center"></td>';
        echo '<td width="15%"><input type="checkbox" name="selector[]" id="selector[]" value="' . $list->officer_id . '"/>';
        echo '<td width="30%" >' . $list->firstname . '</td>';
        echo '<td width="25%" >' . $list->lastname . '</td>';
        echo '<td width="15%" ><a href = "index.php?view=edit&id=' . $list->officer_id . '" ><span class="glyphicon glyphicon-list-alt"> </span>  Edit</a></td>';
        echo '<td><a href = "index.php?view=view&officerId=' . $list->officer_id . '" ><span class="glyphicon glyphicon-list-alt"> </span>  View</a></td>';
        echo '</tr>';
    }
}
?>
							
							
Пример #10
0
 public function invoice()
 {
     $jenjang = Sentry::getUser()->last_name;
     $cost = Setting::first();
     $school = School::where('user_id', Sentry::getUser()->id)->first();
     $payment = Payment::where('user_id', Sentry::getUser()->id)->where(DB::raw('year'), '=', date('Y'))->first();
     if ($jenjang === 'SMA') {
         $runpas = Contest::where('nocontest', 'Lari 100m pa')->where('user_id', Sentry::getUser()->id)->where(DB::raw('tahun'), '=', date('Y'))->where('verifikasi', 1)->count();
         $runpis = Contest::where('nocontest', 'Lari 100m pi')->where('user_id', Sentry::getUser()->id)->where(DB::raw('tahun'), '=', date('Y'))->where('verifikasi', 1)->count();
         $ljpas = Contest::where('nocontest', 'Lompat Jauh pa')->where('user_id', Sentry::getUser()->id)->where(DB::raw('tahun'), '=', date('Y'))->where('verifikasi', 1)->count();
         $ljpis = Contest::where('nocontest', 'Lompat Jauh pi')->where('user_id', Sentry::getUser()->id)->where(DB::raw('tahun'), '=', date('Y'))->where('verifikasi', 1)->count();
         $tppas = Contest::where('nocontest', 'Tolak Peluru pa')->where('user_id', Sentry::getUser()->id)->where(DB::raw('tahun'), '=', date('Y'))->where('verifikasi', 1)->count();
         $tppis = Contest::where('nocontest', 'Tolak Peluru pi')->where('user_id', Sentry::getUser()->id)->where(DB::raw('tahun'), '=', date('Y'))->where('verifikasi', 1)->count();
         $ltpas = Contest::where('nocontest', 'Lompat Tinggi pa')->where('user_id', Sentry::getUser()->id)->where(DB::raw('tahun'), '=', date('Y'))->where('verifikasi', 1)->count();
         $ltpis = Contest::where('nocontest', 'Lompat Tinggi pi')->where('user_id', Sentry::getUser()->id)->where(DB::raw('tahun'), '=', date('Y'))->where('verifikasi', 1)->count();
         $sertatl = Contest::where('user_id', Sentry::getUser()->id)->where(DB::raw('tahun'), '=', date('Y'))->where('verifikasi', 1)->whereNotNull('nodada')->where('sertifikat', 1)->count();
         $sertoff = Officer::where('user_id', Sentry::getUser()->id)->where(DB::raw('YEAR(created_at)'), '=', date('Y'))->where('sertifikat', 1)->count();
         $book = Docbook::where('user_id', Sentry::getUser()->id)->where(DB::raw('YEAR(created_at)'), '=', date('Y'))->where('docbook', 1)->count();
         $jrunpas = $runpas * $cost->moneyreg;
         $jrunpis = $runpis * $cost->moneyreg;
         $jljpas = $ljpas * $cost->moneyreg;
         $jljpis = $ljpis * $cost->moneyreg;
         $jtppas = $tppas * $cost->moneyreg;
         $jtppis = $tppis * $cost->moneyreg;
         $jltpas = $ltpas * $cost->moneyreg;
         $jltpis = $ltpis * $cost->moneyreg;
         $jsertatl = $sertatl * $cost->moneysertatl;
         $jsertoff = $sertoff * $cost->moneysertoff;
         $jbook = $book * $cost->moneydocbook;
         $jtotal = $jrunpas + $jrunpis + $jljpas + $jljpis + $jtppas + $jtppis + $jltpas + $jltpis + $jsertatl + $jsertoff + $jbook;
         return View::make('costs.invoice2')->with('runpas', $runpas)->with('runpis', $runpis)->with('ljpas', $ljpas)->with('ljpis', $ljpis)->with('tppas', $tppas)->with('tppis', $tppis)->with('ltpas', $ltpas)->with('ltpis', $ltpis)->with('sertatl', $sertatl)->with('sertoff', $sertoff)->with('book', $book)->with('jrunpas', $jrunpas)->with('jrunpis', $jrunpis)->with('jljpas', $jljpas)->with('jljpis', $jljpis)->with('jtppas', $jtppas)->with('jtppis', $jtppis)->with('jltpas', $jltpas)->with('jltpis', $jltpis)->with('jsertatl', $jsertatl)->with('jsertoff', $jsertoff)->with('jbook', $jbook)->with('jtotal', $jtotal)->with('cost', $cost)->with('school', $school)->with('payment', $payment);
     } elseif ($jenjang === 'SMP') {
         $runpas = Contest::where('nocontest', 'Lari 60m pa')->where('user_id', Sentry::getUser()->id)->where(DB::raw('tahun'), '=', date('Y'))->where('verifikasi', 1)->count();
         $runpis = Contest::where('nocontest', 'Lari 60m pi')->where('user_id', Sentry::getUser()->id)->where(DB::raw('tahun'), '=', date('Y'))->where('verifikasi', 1)->count();
         $ljpas = Contest::where('nocontest', 'Lompat Jauh pa')->where('user_id', Sentry::getUser()->id)->where(DB::raw('tahun'), '=', date('Y'))->where('verifikasi', 1)->count();
         $ljpis = Contest::where('nocontest', 'Lompat Jauh pi')->where('user_id', Sentry::getUser()->id)->where(DB::raw('tahun'), '=', date('Y'))->where('verifikasi', 1)->count();
         $tppas = Contest::where('nocontest', 'Tolak Peluru pa')->where('user_id', Sentry::getUser()->id)->where(DB::raw('tahun'), '=', date('Y'))->where('verifikasi', 1)->count();
         $tppis = Contest::where('nocontest', 'Tolak Peluru pi')->where('user_id', Sentry::getUser()->id)->where(DB::raw('tahun'), '=', date('Y'))->where('verifikasi', 1)->count();
         $ltpas = Contest::where('nocontest', 'Lompat Tinggi pa')->where('user_id', Sentry::getUser()->id)->where(DB::raw('tahun'), '=', date('Y'))->where('verifikasi', 1)->count();
         $ltpis = Contest::where('nocontest', 'Lompat Tinggi pi')->where('user_id', Sentry::getUser()->id)->where(DB::raw('tahun'), '=', date('Y'))->where('verifikasi', 1)->count();
         $sertatl = Contest::where('user_id', Sentry::getUser()->id)->where(DB::raw('tahun'), '=', date('Y'))->where('verifikasi', 1)->whereNotNull('nodada')->where('sertifikat', 1)->count();
         $sertoff = Officer::where('user_id', Sentry::getUser()->id)->where(DB::raw('YEAR(created_at)'), '=', date('Y'))->where('sertifikat', 1)->count();
         $book = Docbook::where('user_id', Sentry::getUser()->id)->where(DB::raw('YEAR(created_at)'), '=', date('Y'))->where('docbook', 1)->count();
         $jrunpas = $runpas * $cost->moneyreg;
         $jrunpis = $runpis * $cost->moneyreg;
         $jljpas = $ljpas * $cost->moneyreg;
         $jljpis = $ljpis * $cost->moneyreg;
         $jtppas = $tppas * $cost->moneyreg;
         $jtppis = $tppis * $cost->moneyreg;
         $jltpas = $ltpas * $cost->moneyreg;
         $jltpis = $ltpis * $cost->moneyreg;
         $jsertatl = $sertatl * $cost->moneysertatl;
         $jsertoff = $sertoff * $cost->moneysertoff;
         $jbook = $book * $cost->moneydocbook;
         $jtotal = $jrunpas + $jrunpis + $jljpas + $jljpis + $jtppas + $jtppis + $jltpas + $jltpis + $jsertatl + $jsertoff + $jbook;
         return View::make('costs.invoice2')->with('runpas', $runpas)->with('runpis', $runpis)->with('ljpas', $ljpas)->with('ljpis', $ljpis)->with('tppas', $tppas)->with('tppis', $tppis)->with('ltpas', $ltpas)->with('ltpis', $ltpis)->with('sertatl', $sertatl)->with('sertoff', $sertoff)->with('book', $book)->with('jrunpas', $jrunpas)->with('jrunpis', $jrunpis)->with('jljpas', $jljpas)->with('jljpis', $jljpis)->with('jtppas', $jtppas)->with('jtppis', $jtppis)->with('jltpas', $jltpas)->with('jltpis', $jltpis)->with('jsertatl', $jsertatl)->with('jsertoff', $jsertoff)->with('jbook', $jbook)->with('jtotal', $jtotal)->with('cost', $cost)->with('school', $school)->with('payment', $payment);
     } elseif ($jenjang === 'SD') {
         $runpas = Contest::where('nocontest', 'Lari 50m pa')->where('user_id', Sentry::getUser()->id)->where(DB::raw('tahun'), '=', date('Y'))->where('verifikasi', 1)->count();
         $runpis = Contest::where('nocontest', 'Lari 50m pi')->where('user_id', Sentry::getUser()->id)->where(DB::raw('tahun'), '=', date('Y'))->where('verifikasi', 1)->count();
         $ljpas = Contest::where('nocontest', 'Lompat Jauh pa')->where('user_id', Sentry::getUser()->id)->where(DB::raw('tahun'), '=', date('Y'))->where('verifikasi', 1)->count();
         $ljpis = Contest::where('nocontest', 'Lompat Jauh pi')->where('user_id', Sentry::getUser()->id)->where(DB::raw('tahun'), '=', date('Y'))->where('verifikasi', 1)->count();
         $lbpas = Contest::where('nocontest', 'Lempar Bola pa')->where('user_id', Sentry::getUser()->id)->where(DB::raw('tahun'), '=', date('Y'))->where('verifikasi', 1)->count();
         $lbpis = Contest::where('nocontest', 'Lempar Bola pi')->where('user_id', Sentry::getUser()->id)->where(DB::raw('tahun'), '=', date('Y'))->where('verifikasi', 1)->count();
         $lespa = Contest::where('nocontest', 'Lari Estafet pa')->where('user_id', Sentry::getUser()->id)->where(DB::raw('tahun'), '=', date('Y'))->where('verifikasi', 1)->count();
         $lespi = Contest::where('nocontest', 'Lari Estafet pi')->where('user_id', Sentry::getUser()->id)->where(DB::raw('tahun'), '=', date('Y'))->where('verifikasi', 1)->count();
         $sertatl = Contest::where('user_id', Sentry::getUser()->id)->where(DB::raw('tahun'), '=', date('Y'))->where('verifikasi', 1)->whereNotNull('nodada')->where('sertifikat', 1)->count();
         $sertoff = Officer::where('user_id', Sentry::getUser()->id)->where(DB::raw('YEAR(created_at)'), '=', date('Y'))->where('sertifikat', 1)->count();
         $book = Docbook::where('user_id', Sentry::getUser()->id)->where(DB::raw('YEAR(created_at)'), '=', date('Y'))->where('docbook', 1)->count();
         $jrunpas = $runpas * $cost->moneyreg;
         $jrunpis = $runpis * $cost->moneyreg;
         $jljpas = $ljpas * $cost->moneyreg;
         $jljpis = $ljpis * $cost->moneyreg;
         $jlbpas = $lbpas * $cost->moneyreg;
         $jlbpis = $lbpis * $cost->moneyreg;
         if ($lespa % 8 == 0) {
             $lespa = $lespa / 8;
             $jlespa = $lespa * $cost->moneyregest;
         } else {
             $lespa = 0;
             $jlespa = $lespa * $cost->moneyregest;
         }
         if ($lespi % 8 == 0) {
             $lespi = $lespi / 8;
             $jlespi = $lespi * $cost->moneyregest;
         } else {
             $lespi = 0;
             $jlespi = $lespi * $cost->moneyregest;
         }
         $jsertatl = $sertatl * $cost->moneysertatl;
         $jsertoff = $sertoff * $cost->moneysertoff;
         $jbook = $book * $cost->moneydocbook;
         $jtotal = $jrunpas + $jrunpis + $jljpas + $jljpis + $jlbpas + $jlbpis + $jlespa + $jlespi + $jsertatl + $jsertoff + $jbook;
         return View::make('costs.invoice2')->with('runpas', $runpas)->with('runpis', $runpis)->with('ljpas', $ljpas)->with('ljpis', $ljpis)->with('lbpas', $lbpas)->with('lbpis', $lbpis)->with('lespa', $lespa)->with('lespi', $lespi)->with('sertatl', $sertatl)->with('sertoff', $sertoff)->with('book', $book)->with('jrunpas', $jrunpas)->with('jrunpis', $jrunpis)->with('jljpas', $jljpas)->with('jljpis', $jljpis)->with('jlbpas', $jlbpas)->with('jlbpis', $jlbpis)->with('jlespa', $jlespa)->with('jlespi', $jlespi)->with('jsertatl', $jsertatl)->with('jsertoff', $jsertoff)->with('jbook', $jbook)->with('jtotal', $jtotal)->with('cost', $cost)->with('school', $school)->with('payment', $payment);
     }
 }
Пример #11
0
 public function exportrekappendamping()
 {
     Session::put('softahun', Input::get('tahun'));
     // Session::put('sofjenjang', Input::get('jenjang'));
     $pilihan = Input::get('pilihan');
     if ($pilihan == 'Daftar') {
         $officers = Officer::where(DB::raw('YEAR(created_at)'), '=', Session::get('softahun'))->orderBy('user_id', 'asc')->get();
     } else {
         if ($pilihan == 'Sertifikat') {
             $officers = Officer::where(DB::raw('YEAR(created_at)'), '=', Session::get('softahun'))->where('sertifikat', '1')->orderBy('user_id', 'asc')->get();
         }
     }
     return $this->exportExcelseratlet($officers, $pilihan);
 }
Пример #12
0
function doEdit()
{
    if (isset($_POST['submit'])) {
        $officer_id = $_POST['officer_id'];
        $FIRSTNAME = $_POST['firstname'];
        $MIDDLENAME = $_POST['middlename'];
        $LASTNAME = $_POST['lastname'];
        $DISPLAYNAME = $_POST['displayname'];
        $SEX = $_POST['gender'];
        $QUALIFICATION = $_POST['qualify'];
        $TITLE = $_POST['title'];
        $EMAIL = $_POST['email'];
        $TELEPHONE = $_POST['telephone'];
        $MOBILE = $_POST['mobile'];
        $WEBSITE = $_POST['website'];
        $BUREAU = $_POST['bureau'];
        $SCHOOL = $_POST['school'];
        $officer = new Officer();
        $officer->officer_id = $officer_id;
        $officer->firstname = $FIRSTNAME;
        $officer->middlename = $MIDDLENAME;
        $officer->lastname = $LASTNAME;
        $officer->gender = $SEX;
        $officer->displayname = $DISPLAYNAME;
        $officer->qualification = $QUALIFICATION;
        $officer->title = $TITLE;
        $officer->email = $EMAIL;
        $officer->telephone = $TELEPHONE;
        $officer->mobile = $MOBILE;
        $officer->website = $WEBSITE;
        if (!$BUREAU == "") {
            $officer->officer_bureau_id = $BUREAU;
        } else {
            $officer->officer_school_id = $SCHOOL;
        }
    }
    if (!$BUREAU == "") {
        if ($officer_id == "") {
            message('Officer ID is required!', "error");
            redirect('index.php?view=edit&id=' . $officer_id);
        } elseif ($FIRSTNAME == "") {
            message('First name is required!', "error");
            redirect('index.php?view=edit&id=' . $officer_id);
        } elseif ($LASTNAME == "") {
            message('Last Name is required!', "error");
            redirect('index.php?view=edit&id=' . $officer_id);
        } elseif ($MIDDLENAME == "") {
            message('Middle Name is required!', "error");
            redirect('index.php?view=edit&id=' . $officer_id);
        } elseif ($SEX == "") {
            message('Gender Name is required!', "error");
            redirect('index.php?view=edit&id=' . $officer_id);
        } elseif ($DISPLAYNAME == "") {
            message('Display name is required!', "error");
            redirect('index.php?view=edit&id=' . $officer_id);
        } elseif ($QUALIFICATION == "") {
            message('Qualification is required!', "error");
            redirect('index.php?view=edit&id=' . $officer_id);
        } elseif ($TITLE == "") {
            message('Title is required!', "error");
            redirect('index.php?view=edit&id=' . $officer_id);
        } elseif ($EMAIL == "") {
            message('Email address is required!', "error");
            redirect('index.php?view=edit&id=' . $officer_id);
        } elseif ($TELEPHONE == "") {
            message('Telephone is required!', "error");
            redirect('index.php?view=edit&id=' . $officer_id);
        } elseif ($MOBILE == "") {
            message('Mobile is required!', "error");
            redirect('index.php?view=edit&id=' . $officer_id);
        } elseif ($WEBSITE == "") {
            message('Website is required!', "error");
            redirect('index.php?view=edit&id=' . $officer_id);
        }
        $officer->update($_GET['id']);
        message('Officer infomation updated successfully!', "info");
        redirect('index.php');
    } else {
        if ($officer_id == "") {
            message('Officer ID is required!', "error");
            redirect('index.php?view=edit&id=' . $officer_id);
        } elseif ($FIRSTNAME == "") {
            message('First name is required!', "error");
            redirect('index.php?view=edit&id=' . $officer_id);
        } elseif ($LASTNAME == "") {
            message('Last Name is required!', "error");
            redirect('index.php?view=edit&id=' . $officer_id);
        } elseif ($MIDDLENAME == "") {
            message('Middle Name is required!', "error");
            redirect('index.php?view=edit&id=' . $officer_id);
        } elseif ($SEX == "") {
            message('Gender Name is required!', "error");
            redirect('index.php?view=edit&id=' . $officer_id);
        } elseif ($DISPLAYNAME == "") {
            message('Display name is required!', "error");
            redirect('index.php?view=edit&id=' . $officer_id);
        } elseif ($QUALIFICATION == "") {
            message('Qualification is required!', "error");
            redirect('index.php?view=edit&id=' . $officer_id);
        } elseif ($TITLE == "") {
            message('Title is required!', "error");
            redirect('index.php?view=edit&id=' . $officer_id);
        } elseif ($EMAIL == "") {
            message('Email address is required!', "error");
            redirect('index.php?view=edit&id=' . $officer_id);
        } elseif ($TELEPHONE == "") {
            message('Telephone is required!', "error");
            redirect('index.php?view=edit&id=' . $officer_id);
        } elseif ($MOBILE == "") {
            message('Mobile is required!', "error");
            redirect('index.php?view=edit&id=' . $officer_id);
        } elseif ($WEBSITE == "") {
            message('Website is required!', "error");
            redirect('index.php?view=edit&id=' . $officer_id);
        } elseif ($SCHOOL == "") {
            message('School ID is required!', "error");
            redirect('index.php?view=edit&id=' . $officer_id);
        }
        $officer->update($_GET['id']);
        message('Officer infomation updated successfully!', "info");
        redirect('index.php');
    }
}
Пример #13
0
                                <span class="pull-right"><i class="fa fa-arrow-circle-right"></i></span>
                                <div class="clearfix"></div>
							</div>
						</a>
					</div>
				</div>
                <div class="col-lg-6 col-md-6">
                    <div class="panel panel-primary">
                        <div class="panel-heading">
                            <div class="row">
                                <div class="col-xs-3">
                                    <P><strong><h5>Officers</h5></strong></p>
								</div>
                                <div class="col-xs-9 text-right">
									<?php 
$officer = new Officer();
$officernum = $officer->find_all_officer();
?>
                                    <div class="huge"><?php 
echo $officernum;
?>
</div>
								</div>
							</div>
						</div>
                        <a href="<?php 
echo WEB_ROOT;
?>
admin/modules/officer/index.php">
                            <div class="panel-footer">
                                <span class="pull-left">Details</span>
Пример #14
0
<?php

include_once '../../class/pattern/strategy.php';
$officer = new Officer("諸葛亮", 100, new FireBullStrategy());
echo $officer->useStrategy();
echo '<br/>';
$officer->setStractegy(new ScoffStrategy());
echo $officer->useStrategy();
Пример #15
0
								</a
								</p>
							</div>
							<div class="col-xs-6">
								<p align="right"><a href="<?php 
echo WEB_ROOT;
?>
admin/logout.php"
								class="btn btn-info btn-xsm"><span class="glyphicon glyphicon-log-out"></span>Log out</a></p>
							</div>
						</div>
					</div>
				</div>
				</div> 
				<?php 
$officer = new Officer();
$list = $officer->single_officer($_GET['officerId']);
?>
				<form class="form-horizontal well span9" action="controller.php?action=edit&id=<?php 
echo $list->officer_id;
?>
" method="POST">
					
					<fieldset>
						<legend>Officer Information</legend>
						
						<div class="col-md-8">
							<label class="col-md-4 control-label" for="officer_id">Officer Number </label>
							
							<div class="col-md-8">
								<input class="form-control input-sm" id="officer_id" name="officer_id" type="text" value="<?php 
Пример #16
0
<?php

$officer = new Officer();
$cur = $officer->single_officer($_SESSION['OFFICER_ID']);
?>
<div class="container">
	<div class="panel panel-primary">
		<div class="panel-heading">
<div class="row">
				<div class="col-xs-3"><p align="left"><a href="<?php 
echo WEB_ROOT;
?>
officer/index.php?page=1" class="btn btn-info btn-xsm"><span class="glyphicon glyphicon-home"></span>&nbsp;Home</a><p>
				</div>
				<div class="col-xs-9">
					<div class="col-xs-8">
						<p ><strong><h5 align="right">
						<?php 
echo $_SESSION['ACCOUNT_FNAME'] . " " . $_SESSION['ACCOUNT_LNAME'];
?>
</h5></strong></p>
					</div>
					<div class="col-xs-4">
						<div class="col-xs-6">
							<p align="left"><a href="<?php 
echo WEB_ROOT;
?>
officer/index.php?page=1" class="btn btn-info btn-xsm">
								<span class="glyphicon glyphicon-step-backward"></span>Back
							</a
							</p>
Пример #17
0
Файл: seed.php Проект: ajb/rfpez
 private function minimal_data()
 {
     $faker = Faker\Factory::create();
     for ($i = 0; $i < 5; $i++) {
         Factory::vendor();
     }
     for ($i = 0; $i < 5; $i++) {
         Factory::officer();
     }
     $project_type_1 = ProjectType::first();
     // Create project sections
     $section1 = ProjectSection::create(array('section_category' => 'Deliverables', 'title' => 'Information Architecture', 'public' => true, 'body' => 'Information architecture (IA) and initial site map for the redesigned {{WEBSITE}} site. This IA and site map will be used so copy can be revised and/or developed in-house while the contractor is in the process of executing other deliverable products. Note the IA and site map will only include content/sites currently in the {{WEBSITE}} infrastructure.'));
     $section2 = ProjectSection::create(array('section_category' => 'Deliverables', 'title' => 'Page Templating', 'public' => true, 'body' => 'Complete redesign of {{WEBSITE}} and templates for outreach materials. This includes the complete website, features, applications, blog, social media, mobile, email and newsletters, and any items deemed best to connect with the audiences identified in Deliverable Product #1.'));
     $section3 = ProjectSection::create(array('section_category' => 'Objectives', 'title' => 'Increased Visibility', 'public' => true, 'body' => $faker->paragraph));
     // Link project sections to api project type
     $project_type_1->project_sections()->sync(array($section1->id, $section2->id, $section3->id));
     // Create first project
     $project = new Project(array('project_type_id' => $project_type_1->id, 'title' => 'API for SBA.gov Dynamic Small Business Search', 'agency' => 'Small Business Administration', 'office' => 'Office of Innovation and Research', 'recommended' => true, 'public' => true, 'background' => $faker->paragraph, 'sections' => array($section1->id, $section2->id, $section3->id), 'variables' => array('WEBSITE' => 'api.dsbs.sba.gov'), 'deliverables' => array('Information Architecture' => '1/1/13', 'Page Templating' => '2/8/13'), 'proposals_due_at' => new \DateTime('12/31/2012')));
     $project->posted_to_fbo_at = new \DateTime();
     $project->save();
     // ...And give it to officer1
     $project->officers()->attach(Officer::first()->id, array('owner' => true));
 }