Exemple #1
0
        break;
        // LARGE Classes here
    // LARGE Classes here
    case 'cats':
        include 'cl/Categories.php';
        $ctr = new Categories();
        $result = $ctr->process($a, $post, $get);
        break;
    case 'dests':
        include 'cl/Destinations.php';
        $ctr = new Destinations();
        $result = $ctr->process($a, $post, $get);
        break;
    case 'destination':
        include 'cl/Destinations.php';
        $ctr = new Destinations();
        $result = $ctr->process($a, $post, $get);
        break;
    case 'screen':
        include 'cl/Screen.php';
        $ctr = new Screen();
        $result = $ctr->process($a, $post, $get);
        break;
    case 'importexport':
        include 'cl/ImportExport.php';
        $ctr = new ImportExport();
        $result = $ctr->process($a, json_decode(file_get_contents("php://input")), $get);
        break;
}
if (is_string($result)) {
    echo $result;
Exemple #2
0
<?php

define('DATA', '../../data/');
include 'cl/Destinations.php';
$ctr = new Destinations();
$res = $ctr->getAllDests();
echo json_encode($res);
//include 'cl/Statistics.php';
// $ctr=new Statistics();
//$ctr->moveStatistics();
//sleep(10);
//$ctr->createNewDatabase();
Exemple #3
0
 public function edit()
 {
     if (!Auth::user()) {
         return Redirect::to('/login');
     }
     // Get interest and destination choice data
     $data = array('interests' => Interests::all()->sortBy('orderIndex'), 'interests_categories' => InterestsCategories::all()->sortBy('orderIndex'), 'destinations' => Destinations::where('publish', '=', 1)->get()->sortBy('orderIndex'), 'member_cards' => Member::getCards(), 'member' => Member::where('user_id', '=', Auth::user()->id)->first(), 'user' => Auth::user());
     // populate members destinations into easily emutable array
     $data['members_destinations'] = array();
     $m_dest = MembersDestinations::where('current_id', '=', $data['member']->id)->get();
     foreach ($m_dest as $dest) {
         $data['members_destinations'][] = $dest->destination_id;
     }
     // populate members interests into easily emutable array
     $data['members_interests'] = array();
     $m_int = MembersInterests::where('current_id', '=', $data['member']->id)->get();
     foreach ($m_int as $int) {
         $data['members_interests'][] = $int->interest_id;
     }
     // Convert object to array so it can be chunked for signup list
     $tmpdest = array();
     foreach ($data['destinations'] as $dest) {
         $tmpdest[] = $dest;
     }
     $data['destinations_chunks'] = array_chunk($tmpdest, ceil(count($data['destinations']) / 3));
     // Push view to content
     $this->layout->content = View::make('pages.edit', $data);
 }