Beispiel #1
0
 public function run()
 {
     DB::table('clubs')->delete();
     Club::create(array('nom' => '---', 'nomcourt' => '---', 'region_id' => 1));
     Club::create(array('nom' => 'Golf club de Rigenée', 'nomcourt' => 'Rigenée', 'region_id' => 4));
     Club::create(array('nom' => 'Golf Club de Pierpont', 'nomcourt' => 'Pierpont', 'region_id' => 4));
     Club::create(array('nom' => 'Royal Golf Club de Waterloo', 'nomcourt' => 'Waterloo', 'region_id' => 4));
     Club::create(array('nom' => 'Golf de Bondues', 'nomcourt' => 'Bondues', 'region_id' => 33));
     Club::create(array('nom' => 'Golf de Lille-Métropole', 'nomcourt' => 'Lille Métropole', 'region_id' => 33));
     Club::create(array('nom' => 'Golf du Grand-Ducal', 'nomcourt' => 'Grand Ducal', 'region_id' => 41));
     DB::table('parcours')->delete();
     Parcour::create(array('club_id' => 1, 'nom' => '---', 'nbtrous' => 18));
     Parcour::create(array('club_id' => 2, 'nom' => 'Rigenée', 'nbtrous' => 18));
     Parcour::create(array('club_id' => 3, 'nom' => 'Grand Pierpont', 'nbtrous' => 18));
     Parcour::create(array('club_id' => 4, 'nom' => 'La Marache', 'nbtrous' => 18));
     Parcour::create(array('club_id' => 4, 'nom' => 'Le Lion', 'nbtrous' => 18));
     Parcour::create(array('club_id' => 4, 'nom' => 'Bois Héros', 'nbtrous' => 9));
     Parcour::create(array('club_id' => 5, 'nom' => 'Hawtree', 'nbtrous' => 18));
     Parcour::create(array('club_id' => 5, 'nom' => 'Trent Jones', 'nbtrous' => 18));
     Parcour::create(array('club_id' => 6, 'nom' => 'Lille-Métropole', 'nbtrous' => 18));
     Parcour::create(array('club_id' => 7, 'nom' => 'Grand-Ducal', 'nbtrous' => 18));
 }
Beispiel #2
0
     }
     $object = new Club();
     $object->schoolid = $school->id;
     $object->name = $_POST['name'];
     $object->about = $_POST['about'];
     $object->fbcomments = $_POST['fbcomments'];
     $object->comments = $_POST['comments'];
     $file = new File($_FILES['logo']);
     if ($file->valid) {
         $object->logo = $file->data;
     }
     $file = new File($_FILES['cover']);
     if ($file->valid) {
         $object->cover = $file->data;
     }
     $object->create();
     $clubuser = new ClubUser();
     $clubuser->clubid = $object->id;
     $clubuser->userid = $session->user_id;
     $clubuser->level = 1;
     $clubuser->role = "admin";
     $clubuser->enabled = 1;
     $clubuser->pending = 0;
     $clubuser->create();
     $log = new Log($session->user_id, $clientip, "WEB", "CREATED CLUB: " . $object->id);
     $log->create();
     $message = "success";
 } else {
     $log = new Log($session->user_id, $clientip, "WEB", "CREATE CLUB NOT FILLED");
     $log->create();
     $message = "All fields are required.";
Beispiel #3
0
 case 'A':
     if (strlen($newcode) == 0) {
         include 'php/wrongentry.php';
         exit(0);
     }
     checkclash($newcode);
     $club = new Club($newcode);
     $club->Name = $newname;
     $club->Contactfirst = $contfirst;
     $club->Contactlast = $contlast;
     $club->Contactemail = $contemail;
     $club->Contactphone = $contphone;
     $club->Website = $website;
     $club->Night = $night;
     $club->Schools = $sch;
     $club->create();
     $Title = "Club {$club->display_name()} created OK";
     break;
 default:
     try {
         $club = new Club();
         $club->frompost();
         $club->fetchdets();
     } catch (ClubException $e) {
         $mess = $e->getMessage();
         include 'php/wrongentry.php';
         exit(0);
     }
     // If name has changed, check it doesn't clash
     if ($newcode != $club->Code) {
         checkclash($newcode);
Beispiel #4
0
function create_clubs()
{
    foreach (range(0, 10) as $i) {
        Club::create(array('name' => 'club' . $i));
    }
}
 public function run()
 {
     Club::create(array('nombre' => 'Junior Los Teques', 'direccion_sede' => 'Universidad Catolica UCAB Los Teques', 'ind_active' => '1'));
 }
 public function run()
 {
     Eloquent::unguard();
     /**
      * Clearing table
      */
     DB::table('clubs')->delete();
     /**
      * Creating clubs
      */
     Club::create(array('clb_title' => '-'));
     // default - do not delete!
     /**
      * Reporting result to console
      */
     $this->command->info('Default club created.');
 }