public function getOrCreateByName($name)
 {
     $slug = $this->slugify->simple($name);
     $document = $this->findOneBySlug($slug);
     if ($document) {
         return $document;
     }
     $conference = new Conference();
     $conference->setName($name);
     $conference->setSlug($slug);
     $conference->save();
     return $conference;
 }
 public function testFetchesOneConference()
 {
     $conferenceId = Conference::first()->id;
     $response = $this->call('GET', 'api/conferences/' . $conferenceId);
     $data = $this->parseJson($response);
     $this->assertIsJson($data);
     $this->assertInternalType('object', $data->data);
 }
Beispiel #3
0
 /** @test */
 public function un_submitting_does_not_delete_conference()
 {
     $user = Factory::create('user');
     $conference = Factory::create('conference');
     $talk = Factory::create('talk', ['author_id' => $user->id]);
     $revision = Factory::create('talkRevision');
     $talk->revisions()->save($revision);
     Bus::dispatch(new CreateSubmission($conference->id, $revision->id));
     Bus::dispatch(new DestroySubmission($conference->id, $revision->id));
     $this->assertEquals(1, Conference::find($conference->id)->count());
 }
 public function run()
 {
     Conference::truncate();
     $faker = Faker::create();
     $user_ids = collect(User::lists('id'));
     $conference_names = collect(['MegaAwesomeCon', 'SuperPHP', 'ActiveRecordCon', 'ConCon', 'GoodJobFest', 'TightenFest', 'UltraMegaCon', 'ArbysCon']);
     foreach (range(1, 30) as $i) {
         $starts_at = $faker->dateTimeBetween('now', '3 years');
         $cfp_starts_at = $faker->dateTimeBetween('now', $starts_at);
         Factory::create('conference', ['author_id' => $user_ids->random(), 'title' => $conference_names->random() . " {$starts_at->format('Y')}", 'description' => $faker->sentence, 'starts_at' => $starts_at, 'ends_at' => Carbon::instance($starts_at)->addDays(2), 'cfp_starts_at' => $cfp_starts_at, 'cfp_ends_at' => Carbon::instance($cfp_starts_at)->addDays(rand(15, 30))]);
     }
 }
Beispiel #5
0
 /**
  * Internal function to return a Conference object from a row.
  * @param $row array
  * @return Conference
  */
 function &_returnConferenceFromRow(&$row)
 {
     $conference = new Conference();
     $conference->setConferenceId($row['conference_id']);
     $conference->setPath($row['path']);
     $conference->setSequence($row['seq']);
     $conference->setEnabled($row['enabled']);
     $conference->setPrimaryLocale($row['primary_locale']);
     HookRegistry::call('ConferenceDAO::_returnConferenceFromRow', array(&$conference, &$row));
     return $conference;
 }
 public function load()
 {
     $this->clear();
     $conference = new Conference('Atlantic Coast');
     $level = $this->CI->_level->findOneBySlug('college');
     $conference->setLevel($level);
     $league = $this->CI->_league->findOneBySlug('ncaa');
     $conference->setLeague($league);
     $division = $this->CI->_division->findOneBySlug('d1');
     $conference->setDivision($division);
     $conference->save();
     print_r(sprintf("Created Conference: %s (%s)\n", $conference->getName(), $conference->getId()));
 }
 /**
  * Get a list of every event in Joind.in that doesn't exist in our system
  *
  * @return array
  */
 protected function listUnsyncedEvents()
 {
     $return = [];
     $conferences = $this->client->getEvents();
     $alreadyConferences = \Conference::all();
     $joindinIds = $alreadyConferences->map(function ($conference) {
         return (int) $conference->joindin_id;
     });
     $joindinIdsArray = $joindinIds->toArray();
     // @todo this should be a lot simpler if we can get the Collection working
     foreach ($conferences as $conference) {
         if (!in_array($conference['id'], $joindinIdsArray)) {
             $return[] = $conference;
         }
     }
     return $return;
 }
 public static function getConferenceInformation($mandator)
 {
     if (isset($GLOBALS['CONFIG'])) {
         $saved_config = $GLOBALS['CONFIG'];
     }
     Conferences::load($mandator);
     $conf = new Conference();
     $info = ['slug' => $mandator, 'link' => forceslash($mandator), 'active' => !$conf->isClosed(), 'title' => $conf->getTitle(), 'description' => $conf->getDescription(), 'relive' => forceslash($mandator) . $conf->getReliveUrl(), 'releases' => $conf->getReleasesUrl(), 'CONFIG' => $GLOBALS['CONFIG']];
     unset($GLOBALS['CONFIG']);
     if (isset($saved_config)) {
         $GLOBALS['CONFIG'] = $saved_config;
     }
     return $info;
 }
Beispiel #9
0
 static function fail_message($errors)
 {
     global $Conf, $Me, $Opt;
     if (is_string($errors)) {
         $errors = array($errors);
     }
     if (@$Opt["maintenance"]) {
         $errors = array("The site is down for maintenance. " . (is_string($Opt["maintenance"]) ? $Opt["maintenance"] : "Please check back later."));
     }
     if (PHP_SAPI == "cli") {
         fwrite(STDERR, join("\n", $errors) . "\n");
         exit(1);
     } else {
         if (@$_REQUEST["ajax"]) {
             header("Content-Type: " . (@$_REQUEST["jsontext"] ? "text/plain" : "application/json"));
             if (@$Opt["maintenance"]) {
                 echo "{\"error\":\"maintenance\"}\n";
             } else {
                 echo "{\"error\":\"unconfigured installation\"}\n";
             }
         } else {
             if (!$Conf) {
                 $Conf = new Conference(false);
             }
             if ($Opt["shortName"] == "__invalid__") {
                 $Opt["shortName"] = "HotCRP";
             }
             $Me = null;
             header("HTTP/1.1 404 Not Found");
             $Conf->header("HotCRP Error", "", false);
             foreach ($errors as $i => &$e) {
                 $e = ($i ? "<div class=\"hint\">" : "<p>") . htmlspecialchars($e) . ($i ? "</div>" : "</p>");
             }
             echo join("", $errors);
             $Conf->footer();
         }
     }
     exit;
 }
Beispiel #10
0
 function importConference()
 {
     // If necessary, create the conference.
     $conferenceDao =& DAORegistry::getDAO('ConferenceDAO');
     if (!($conference =& $conferenceDao->getConferenceByPath($this->conferencePath))) {
         if ($this->hasOption('verbose')) {
             printf("Creating conference\n");
         }
         unset($conference);
         $conference = new Conference();
         $conference->setPath($this->conferencePath);
         $conference->setPrimaryLocale(Locale::getLocale());
         $conference->setEnabled(true);
         $this->conferenceId = $conferenceDao->insertConference($conference);
         $conferenceDao->resequenceConferences();
         $conference->updateSetting('title', array(Locale::getLocale() => $this->globalConfigInfo['name']), null, true);
         $this->conferenceIsNew = true;
     } else {
         if ($this->hasOption('verbose')) {
             printf("Using existing conference\n");
         }
         $conference->updateSetting('title', array(Locale::getLocale() => $this->globalConfigInfo['name']), null, true);
         $this->conferenceId = $conference->getId();
         $this->conferenceIsNew = false;
     }
     $this->conference =& $conference;
     $roleDao =& DAORegistry::getDAO('RoleDAO');
     if ($this->conferenceIsNew) {
         // All site admins should get a manager role by default
         $admins = $roleDao->getUsersByRoleId(ROLE_ID_SITE_ADMIN);
         foreach ($admins->toArray() as $admin) {
             $role = new Role();
             $role->setConferenceId($this->conferenceId);
             $role->setUserId($admin->getId());
             $role->setRoleId(ROLE_ID_CONFERENCE_MANAGER);
             $roleDao->insertRole($role);
         }
         // Install the default RT versions.
         import('classes.rt.ocs.ConferenceRTAdmin');
         $conferenceRtAdmin = new ConferenceRTAdmin($this->conferenceId);
         $conferenceRtAdmin->restoreVersions(false);
         $confSettings = array('itemsPerPage' => array('int', 25), 'numPageLinks' => array('int', 10));
         foreach ($confSettings as $settingName => $settingInfo) {
             list($settingType, $settingValue) = $settingInfo;
             $this->conference->updateSetting($settingName, $settingValue, $settingType);
         }
     }
 }
} elseif ($perm->have_perm('RESELLER') ) {
  ## here we'd query the reseller domains  $qdomain[] = $auth->
} elseif ($perm->have_perm('ADMIN') ) {
  $qdomains[] = $auth->auth[udomain];
}

if ($_POST[conference_id]) {
  $conference_id=$_POST[conference_id];
} elseif($_GET[conference_id]) {
  $conference_id=$_GET[conference_id];
}else {
  Header("Location: conference.php");
  exit; 
}

$conference = new Conference($data->db, $auth->auth[uname],$auth->auth[udomain]);
$conference->conferenceId=$conference_id;
$conference->get(); // =$conference_id;

$log->log("rm_conf_flag = " . $_POST[rm_conf_flag]) ; 
$log->log("conference_id = " . $_POST[conference_id]) ; 
if ($_POST[rm_conf_flag]){
  delete_conference();  

}



$smarty->assign('conference_date', $conference->conferenceDateFormatted); 
$smarty->assign('conference_id', $conference->conferenceId); 
$smarty->assign('conference_name', $conference->conferenceName); 
 public function show($id)
 {
     $conference = EloquentConference::findOrFail($id);
     $conference = new Conference($conference);
     return response()->jsonApi(['data' => $conference->toArray()]);
 }
Beispiel #13
0
 public function __construct()
 {
     parent::__construct();
     self::$specificSet = array_merge(parent::$specificSet, self::$specificSet);
     self::$specificGet = array_merge(parent::$specificGet, self::$specificGet);
 }
Beispiel #14
0
*/
?>
<!DOCTYPE html>
<html>
<head>
	<?php 
require_once 'ClassFramework.php';
$echohead = new Framework();
$echohead->headbootstrap();
$echohead->headcontent();
?>
	 <title>Conference List</title>
</head>
<body>
	<div style="margin:0 20% 0 20%">
	<h1>会议列表</h1>
	<?php 
require_once 'CONST.php';
require_once 'ClassConference.php';
$domainnum = $_POST['domainnum'];
$ConferenceDomain = $domain_name[$domainnum];
$ConferenceList = new Conference();
$ConferenceList->showDomainConference($ConferenceDomain);
?>
	<h2>
	<a href="index.php"><strong>回到主页</strong></a></h2>
	</div>

</body>
</html>
Beispiel #15
0
 public static function getConferencesForTour($tour_id)
 {
     $conferences = array();
     $result = mysql_query("SELECT conf_id, f_tour_id, name, type, date_created FROM conferences WHERE f_tour_id={$tour_id} ORDER by name");
     if ($result && mysql_num_rows($result) > 0) {
         while ($row = mysql_fetch_assoc($result)) {
             $conf = new Conference();
             foreach ($row as $key => $val) {
                 $conf->{$key} = $val;
                 $conf->loadTeamIds();
             }
             array_push($conferences, $conf);
         }
     }
     return $conferences;
 }
 /**
  * @test
  */
 public function empty_dates_are_treated_as_null()
 {
     $input = ['title' => 'AwesomeConf 2015', 'description' => 'The best conference in the world!', 'url' => 'http://example.com', 'starts_at' => '', 'ends_at' => '', 'cfp_starts_at' => '', 'cfp_ends_at' => ''];
     $form = CreateConferenceForm::fillOut($input, Factory::create('user'));
     $form->complete();
     $conference = Conference::first();
     $this->assertNull($conference->starts_at);
     $this->assertNull($conference->ends_at);
     $this->assertNull($conference->cfp_starts_at);
     $this->assertNull($conference->cfp_ends_at);
 }
Beispiel #17
0
<?php

//use files
require_once 'classes/conference.php';
require_once 'classes/division.php';
require_once 'classes/exceptions.php';
//read parameter from url
$id = $_GET['id'];
try {
    //create object with data
    $c = new Conference($id);
    ?>
<html>
  <head>
  </head>
  <body>
    <table border="1px">
      <tr>
        <td><img src="Images/Conferences/<?php 
    echo $c->get_image();
    ?>
"</img></td>
        <td><?php 
    echo $c->get_name();
    ?>
</td>
      </tr>
    </table>
    <table border="1px">
      <tr><td>Divisions</td></tr>
      <?php 
Beispiel #18
0
$echohead->headbootstrap();
$echohead->headcontent();
?>
	 <title>Detail Information</title>
</head>
<body>
	<div style="margin:0 20% 0 20%">
	<?php 
require_once 'ClassConference.php';
session_start();
$_SESSION['last_url'] = 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'] . '?' . $_SERVER['QUERY_STRING'];
if ($_POST['detail_cn'] != NULL) {
    $_SESSION['event_summary'] = $_POST['detail_cn'];
}
echo '<h1>' . $_SESSION['event_summary'] . '</h1>';
$detailconference = new Conference();
$dcn_id = $detailconference->findConferenceID($_SESSION['event_summary']);
$dcn_id_res = $detailconference->findConferenceInfo($dcn_id);
$detailconference->showConferenceInfo($dcn_id_res);
?>
	<div>
		<form role="form" action="add_event.php" method="post">
			<div class="form-group">
			<p>您的google账号</p>
			<input type="text" placeholder="*****@*****.**" name="googleid">
			<input type="submit" value="添加到您的Google Calendar" class="btn btn-primary"/>
			</div>
		</form>
	</div>
	<h3>
	<a href="index.php"><strong>回到主页</strong></a></h3>
Beispiel #19
0
$echohead->headcontent();
?>
	 <title>Search Full Name</title>
</head>
<body>
<div style="margin:0 20% 0 20%">
	<?php 
/** 
 * @Author : SuperBlee
 * 2014-12-11
 * Search Information of The Conference Full Name
 */
require_once 'ClassConference.php';
$searchinfo = $_POST['si'];
if (!empty($searchinfo)) {
    $searchinfo_conf = new Conference();
    $res = $searchinfo_conf->findConferenceFullname($searchinfo);
    if ($res != null) {
        echo '<table class="table table-striped">';
        foreach ($res as $resline) {
            echo '<tr>
							<td>' . $resline['conferenceShortname'] . '</td>
							<td>' . $resline['conferenceName'] . '</td>
							<td>
								<form method="post" action="SeeInDetail.php">
									<input type="hidden" value="' . $resline['conferenceShortname'] . '" name="detail_cn">
									<input type="submit" value="See And Add To Google Calendar" class="btn btn-primary">
								</form>
							</td>
					  </tr>';
        }
Beispiel #20
0
    public static function showTables()
    {
        global $lng, $tours;
        title($lng->getTrn('name', 'LeagueTables'));
        // Selector for the tournament
        $tour_id = 0;
        if (isset($_POST['tour_id'])) {
            $tour_id = $_POST['tour_id'];
        } else {
            if (isset($_GET['tour_id'])) {
                $tour_id = $_GET['tour_id'];
            }
        }
        $firstTour = 0;
        ?>
    <div class='boxWide'>
        <h3 class='boxTitle2'><?php 
        echo $lng->getTrn('tours', 'LeagueTables');
        ?>
</h3>
        <div class='boxBody'>
			<form method="POST">
				<select name="tour_id">
					<?php 
        $rTours = array_reverse($tours, true);
        foreach ($rTours as $trid => $desc) {
            if ($firstTour == 0) {
                $firstTour = $trid;
            }
            echo "<option value='{$trid}'" . ($trid == $tour_id ? 'SELECTED' : '') . " >{$desc['tname']}</option>\n";
        }
        /*Replace the prior foreach with this once lid is known.
          foreach ($rTours as $trif => $desc) {
            if($firstTour == 0 && $lid == $_SESSION["NS_node_id"]) {
              $firstTour = $trid;
            }
            if($lid == $_SESSION["NS_node_id"]) {
              echo "<option value='$trid'" . ($trid==$tour_id ? 'SELECTED' : '') . " >$desc[tname]</option>\n";
            }
          }
          */
        ?>
				</select>
				<input type="submit" value="OK">
			</form>
        </div>
    </div>
    <?php 
        if ($tour_id == 0) {
            $tour_id = $firstTour;
        }
        // create the tournament and get the sorting rules
        $tour = new Tour($tour_id);
        $SR = array_map(create_function('$val', 'return $val[0]."mv_".substr($val,1);'), $tour->getRSSortRule());
        // load all the teams according to the sorting rule
        list($teams, ) = Stats::getRaw(T_OBJ_TEAM, array(T_NODE_TOURNAMENT => $tour_id), array(1, 1000), $SR, false);
        // Dump all the raw info for the first team as debug so I can work out the fields
        /*
        echo "<!--\n";
        foreach (array_keys($teams[0]) as $field) {
        	echo $field. "=" . $teams[0][$field] . "\n";
        }
        echo "-->\n";
        */
        // Hard coded list of fields to show - matching existing SLOBB/ECBBL league tables
        $fields = array($lng->getTrn('table-coach', 'LeagueTables') => 'f_cname', $lng->getTrn('table-name', 'LeagueTables') => 'name', $lng->getTrn('table-race', 'LeagueTables') => 'f_rname', $lng->getTrn('table-tv', 'LeagueTables') => 'tv', $lng->getTrn('table-played', 'LeagueTables') => 'mv_played', $lng->getTrn('table-won', 'LeagueTables') => 'mv_won', $lng->getTrn('table-draw', 'LeagueTables') => 'mv_draw', $lng->getTrn('table-loss', 'LeagueTables') => 'mv_lost', $lng->getTrn('table-td', 'LeagueTables') => 'mv_sdiff', $lng->getTrn('table-cas', 'LeagueTables') => 'mv_tcdiff', $lng->getTrn('table-points', 'LeagueTables') => 'mv_pts');
        $unplayedTeams = self::getUnplayedTeamsForTournament($tour_id);
        $confs = 0;
        if (Module::isRegistered('Conference')) {
            $confs = Conference::getConferencesForTour($tour_id);
        }
        // Now the clean output.
        ?>
	<div class='boxWide'>
		<h3 class='boxTitle<?php 
        echo T_HTMLBOX_STATS;
        ?>
'><?php 
        echo $tour->name;
        ?>
</h3>
<?php 
        if ($confs == 0 || empty($confs)) {
            // no conferences at all, or not for this league - normal format
            echo <<<EOQ
\t\t<div class='boxBody'>
\t\t\t<table class="boxTable">
EOQ;
            $i = 0;
            self::showHeader($fields);
            self::showPlayedTeams($teams, $fields, $i);
            self::showUnplayedTeams($unplayedTeams, $i);
            echo <<<EOQ
\t\t\t</table>
\t\t</div>
EOQ;
        } else {
            // conferences - so show them one at a time
            $allConfIds = array();
            foreach ($confs as $conf) {
                $allConfIds = array_merge($allConfIds, $conf->teamIds);
                echo <<<EOQ
\t\t<div class='boxWide'>
\t\t\t<h4 class='boxTitleConf'>{$conf->name}</h4>
\t\t\t\t<table class="boxTable">
EOQ;
                $i = 0;
                self::showHeader($fields);
                self::showPlayedTeams($teams, $fields, $i, $conf->teamIds);
                self::showMissingConferenceTeams($teams, $i, $conf);
                echo <<<EOQ
\t\t\t\t</table>
\t\t</div>
EOQ;
            }
            // now check to see if we have teams that aren't in a conference and show them
            $allConfIds = array_unique($allConfIds);
            if (sizeof($allConfIds) < sizeof($teams) + sizeof($unplayedTeams)) {
                $title = $lng->getTrn('no-conf', 'LeagueTables');
                echo <<<EOQ
\t\t<div class='boxWide'>
\t\t\t<h4 class='boxTitleConf'>{$title}</h4>
\t\t\t<table class="boxTable">
EOQ;
                $noConfTeam = array();
                $noConfUPTeam = array();
                foreach ($teams as $t) {
                    if (!in_array($t['team_id'], $allConfIds)) {
                        array_push($noConfTeam, $t);
                    }
                }
                foreach ($unplayedTeams as $t) {
                    if (!in_array($t->team_id, $allConfIds)) {
                        array_push($noConfUPTeam, $t);
                    }
                }
                $i = 0;
                self::showHeader($fields);
                self::showPlayedTeams($noConfTeam, $fields, $i);
                self::showUnplayedTeams($noConfUPTeam, $i);
                echo <<<EOQ
\t\t\t</table>
\t\t</div>
EOQ;
            }
        }
        echo "</div>";
    }
Beispiel #21
0
<?php

//use files
require_once 'classes/conference.php';
require_once 'classes/exceptions.php';
try {
    //create object with data
    $c = new Conference('AFC');
    //display data
    echo $c->get_id() . ' : ' . $c->get_name();
    echo '<br><img src="Images/Conferences/' . $c->get_image() . '"></img>';
} catch (RecordNotFoundException $ex) {
    echo $ex->get_message();
}
Beispiel #22
0
    } else {
        if (!Conferences::exists($mandator)) {
            // old url OR wrong client OR
            // -> error
            require 'view/404.php';
            exit;
        }
    }
    Conferences::load($mandator);
} catch (Exception $e) {
    ob_clean();
    require 'view/500.php';
}
// PER-CONFERENCE CODE
$GLOBALS['MANDATOR'] = $mandator;
$conference = new Conference();
// update template information
$tpl->set(array('baseurl' => forceslash(baseurl()), 'route' => $route, 'canonicalurl' => forceslash(baseurl()) . forceslash($route), 'assets' => '../assets/', 'conference' => $conference, 'feedback' => new Feedback(), 'schedule' => new Schedule(), 'subtitles' => new Subtitles()));
ob_start();
try {
    // ALWAYS AVAILABLE ROUTES
    if ($route == 'feedback/read') {
        require 'view/feedback-read.php';
    } else {
        if ($route == 'schedule.json') {
            require 'view/schedule-json.php';
        } else {
            if ($route == 'gen/main.css') {
                if (Conferences::hasCustomStyles($mandator)) {
                    handle_lesscss_request(Conferences::getCustomStyles($mandator), '../../' . Conferences::getCustomStylesDir($mandator));
                } else {
function create_conference() {
  global $log, $spUser,$_POST,$data; 
  $msgs = array(); 
  // check the title
  if (!$_POST[conference_name] ) { 
    $msgs[] = "Conference must have a title";
    return $msgs  ; 
  } 

  // validate the date ... 
  if (($conference_uts = strtotime($_POST[conference_date]))===false )  { 
    $msgs[] = "Conference date is an Invalid date.";
    return $msgs  ; 
  } 
  list ($m,$d,$y) = split('-',$_POST[conference_date]);

  // Make date objects...
  $confDate = new Date(); 
  $confDate->setMonth($m); 
  $confDate->setYear($y); 
  $confDate->setDay($d); 
  $confDate->setHour(0); 
  $confDate->setMinute(0); 
  $confDate->setSecond(0); 
  $beginTime = $confDate; 
  $endTime = $confDate; 

  list ($beginHour,$beginMinute) = split(':', $_POST[begin_time] ); 
  list ($endHour,$endMinute) = split(':', $_POST[end_time] ); 

  $beginTime->setHour($beginHour); 
  $beginTime->setMinute($beginMinute); 
  $endTime->setHour($endHour); 
  $endTime->setMinute($endMinute); 

  // see if it's the past
  if ($endTime->isPast() ){ 
    $msgs[] = "Conference date is in the Past.";
    return $msgs ; 
  }   

  // Make sure the end time is not less than the begin time
  if (Date::compare($endTime, $beginTime) != 1     ){ 
    $msgs[] = "Start time must be before end time.";
    return $msgs ; 
  }   
  
  // create a new Conference object

  $conference = new Conference($data->db, $spUser->username,$spUser->domain); 

  // get the user's company Id and load the companies constraints
  $conference->getCompanyId(); 
  $conference->loadConstraints() ; 
  // set the date objects.
  $conference->conferenceDate = $confDate; 
  $conference->beginTime = $beginTime; 
  $conference->endTime = $endTime; 
  $conference->conferenceName = $_POST[conference_name] ; 

  // Is the conference too long
  if (!$conference->isMaxTime()) {
    $msgs[] = "Your conference exceeds the maximum amount of minutes.";
    return $msgs  ; 
  } 
  
  // Are there other conferences scheduled for this time.
  if (!$conference->isMaxConcurrent()) {
    $msgs[] = "Your company has other conferences scheduled for this time.";
    return $msgs  ; 
  } 
  $error = "nay!"; 
  if ($conference->create($error) ) { 
    $msgs[] = "Conference created id = " . $conference->conferenceId;
    Header("Location: conference.php?msg=Conference created ") ;
  } else {
    $msgs[] = "Failed to create conference. ";
     $msgs[] = "$error";
  } 
  $owner = new Invitee($data->db, $conference->conferenceId);
  $owner->domain = $spUser->domain;
  $owner->username = $spUser->username;
  $owner->companyId = $conference->companyId; 
  $owner->inviteeEmail = $spUser->dbFields[email_address] ; 
  $owner->ownerFlag =  1; 
  $owner->inviteeName = $spUser->dbFields[first_name] . " " . $spUser->dbFields[last_name] ; 
  // genereate that unique code
  $owner->generateInviteeCode();   
  $owner->create();   
  $owner->sendNotify();   
  
  return $msgs  ; 


}
Beispiel #24
0
<?php

if (isset($_GET['id'])) {
    //use files
    require_once 'classes/conference.php';
    require_once 'classes/division.php';
    require_once 'classes/exceptions.php';
    //read parameter from url
    $id = $_GET['id'];
    try {
        //create object with data
        $c = new Conference($id);
        $json = '{"status" : 0,
              "id" : "' . $c->get_id() . '",
              "name" : "' . $c->get_name() . '",
              "image" : "' . $c->get_image() . '",
              "divisions" : [';
        $first = true;
        foreach ($c->get_divisions() as $d) {
            if ($first) {
                $first = false;
            } else {
                $json .= ',';
            }
            $json .= '{"id" : "' . $d->get_id() . '",
                "name" : "' . $d->get_name() . '"
              }';
        }
        $json .= ']}';
        echo $json;
    } catch (RecordNotFoundException $ex) {
Beispiel #25
0
    echo "<option>Video</option>";
    echo "<option>Room</option>";
    echo "<option>Webcast</option>";
    echo "</select></td>";
    echo "</tr>";
    echo "<tr>";
    echo "<td align='center' colspan='4'> <input type='Submit' value='Submit'></td> ";
    echo "</tr>";
    echo "</table>";
    echo "</form>";
}
$action = $_GET['action'];
//echo $action;
switch ($action) {
    case "new":
        showBlankConference();
        break;
    case "writeNew":
        //get the data from the new conference form
        $confDataArray = $_POST;
        $callDateTime = $confDataArray['callDate'] . " " . $confDataArray['callTime'];
        $resDateArray = getdate();
        $resDate = $resDateArray[year] . "-" . $resDateArray[mon] . "-" . $resDateArray[mday] . " " . $resDateArray[hours] . ":" . $resDateArray[minutes] . ":" . $resDateArray[seconds];
        //print_r($confDataArray);
        $conferenceData = new Conference($callDateTime, $confDataArray[callDuration], $confDataArray[chairName], $confDataArray[chairNumber], $confDataArray[clientRef], $confDataArray[company], $confDataArray[confTitle], $confDataArray[dialType], $confDataArray[numDILines], $confDataArray[numDOLines], $confDataArray[schedulerTel], $confDataArray[scheduler], $confDataArray[conferenceType], $confDataArray[bridge], $confDataArray[leadop], 'No', $confDataArray[accountNumber], $resDate);
        $conferenceData->writeToDB();
        break;
    default:
        echo "No action defined";
        break;
}
Beispiel #26
0
<?php

if (isset($_GET['id'])) {
    //use files
    require_once 'classes/player.php';
    require_once 'classes/position.php';
    require_once 'classes/team.php';
    require_once 'classes/division.php';
    require_once 'classes/conference.php';
    //read parameter from url
    $id = $_GET['id'];
    try {
        //create object with data
        $t = new Team($id);
        $d = new Division($t->get_div_id());
        $c = new Conference($d->get_conf_id());
        $json = '{"status" : 0,
				"id" : "' . $t->get_id() . '",
				"name" : "' . $t->get_city() . '",
				"image":"' . $t->get_image() . '",
				"division":{';
        $json .= '"id":"' . $d->get_id() . '",
                "name":"' . $d->get_name() . '",
						"conference":
						{';
        $json .= '"id":"' . $c->get_id() . '",
											"name":"' . $c->get_name() . '",
											"image":"' . $c->get_image() . '"

                    }},
					"players" : [';
 /**
  * Save conference settings.
  */
 function execute()
 {
     $conferenceDao =& DAORegistry::getDAO('ConferenceDAO');
     if (isset($this->conferenceId)) {
         $conference =& $conferenceDao->getConference($this->conferenceId);
     }
     if (!isset($conference)) {
         $conference = new Conference();
     }
     $conference->setPath($this->getData('conferencePath'));
     $conference->setEnabled($this->getData('enabled'));
     if ($conference->getId() != null) {
         $conferenceDao->updateConference($conference);
     } else {
         $site =& Request::getSite();
         // Give it a default primary locale.
         $conference->setPrimaryLocale($site->getPrimaryLocale());
         $conferenceId = $conferenceDao->insertConference($conference);
         $conferenceDao->resequenceConferences();
         // Make the site administrator the conference manager
         $sessionManager =& SessionManager::getManager();
         $userSession =& $sessionManager->getUserSession();
         if ($userSession->getUserId() != null && $userSession->getUserId() != 0 && !empty($conferenceId)) {
             $roleDao =& DAORegistry::getDAO('RoleDAO');
             $role = new Role();
             $role->setConferenceId($conferenceId);
             $role->setSchedConfId(0);
             $role->setUserId($userSession->getUserId());
             $role->setRoleId(ROLE_ID_CONFERENCE_MANAGER);
             $roleDao->insertRole($role);
         }
         // Make the file directories for the conference
         import('file.FileManager');
         FileManager::mkdir(Config::getVar('files', 'files_dir') . '/conferences/' . $conferenceId);
         FileManager::mkdir(Config::getVar('files', 'files_dir') . '/conferences/' . $conferenceId . '/schedConfs');
         FileManager::mkdir(Config::getVar('files', 'public_files_dir') . '/conferences/' . $conferenceId);
         FileManager::mkdir(Config::getVar('files', 'public_files_dir') . '/conferences/' . $conferenceId . '/schedConfs');
         // Install default conference settings
         $conferenceSettingsDao =& DAORegistry::getDAO('ConferenceSettingsDAO');
         $titles = $this->getData('title');
         AppLocale::requireComponents(array(LOCALE_COMPONENT_OCS_DEFAULT));
         $conferenceSettingsDao->installSettings($conferenceId, Config::getVar('general', 'registry_dir') . '/conferenceSettings.xml', array('privacyStatementUrl' => Request::url($this->getData('conferencePath'), 'index', 'about', 'submissions', null, null, 'privacyStatement'), 'loginUrl' => Request::url('index', 'index', 'login'), 'conferenceUrl' => Request::url($this->getData('conferencePath'), null), 'conferencePath' => $this->getData('conferencePath'), 'primaryLocale' => $site->getPrimaryLocale(), 'aboutUrl' => Request::url($this->getData('conferencePath'), 'index', 'about', null), 'accountUrl' => Request::url($this->getData('conferencePath'), 'index', 'user', 'register'), 'conferenceName' => $titles[$site->getPrimaryLocale()]));
         // Install the default RT versions.
         import('rt.ocs.ConferenceRTAdmin');
         $conferenceRtAdmin = new ConferenceRTAdmin($conferenceId);
         $conferenceRtAdmin->restoreVersions(false);
     }
     $conference->updateSetting('title', $this->getData('title'), 'string', true);
     $conference->updateSetting('description', $this->getData('description'), 'string', true);
     // Make sure all plugins are loaded for settings preload
     PluginRegistry::loadAllPlugins();
     HookRegistry::call('ConferenceSiteSettingsForm::execute', array(&$this, &$conference));
 }
Beispiel #28
0
<head>
	<?php 
require_once 'ClassFramework.php';
$echohead = new Framework();
$echohead->headbootstrap();
$echohead->headcontent();
?>
	 <title>Searching</title>
</head>
<body>
<div style="margin:0 20% 0 20%">
<p><strong>搜索结果</strong></p>
<?php 
require_once 'ClassConference.php';
$searchShortname = $_POST['search_cfnm'];
$searchconf = new Conference();
$searchconf_id = $searchconf->findConferenceID($searchShortname);
if ($searchconf_id != null) {
    session_start();
    $_SESSION['last_url'] = 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'] . '?' . $_SERVER['QUERY_STRING'];
    $searchconf_res = $searchconf->findConferenceInfo($searchconf_id);
    $searchconf->showConferenceInfo($searchconf_res);
    echo '<div>
	<!-- This Shit Part Is the API to  Google. Where it F google-->
		<form role="form" action="add_event.php" method="post">
			<div class="form-group">
			<input type="text" value="您的谷歌账号" placeholder="*****@*****.**" name="googleid">
			<input type="submit" value="添加到我的Google Calendar" class="btn btn-primary"/>
			</div>
		</form>
	</div> ';