コード例 #1
0
 protected function getPresentationFields()
 {
     $categorySource = Summit::ActiveSummit()->Categories()->map('ID', 'FormattedTitleAndDescription')->toArray();
     $categorySource['other'] = '<h4 class="category-label">Other topic...</h4>';
     $fields = FieldList::create()->text('Title', 'Proposed Presentation Title')->configure()->setAttribute('autofocus', 'TRUE')->end()->dropdown('Level', 'Please select the level of your presentation content')->configure()->setEmptyString('-- Select one --')->setSource(Presentation::create()->dbObject('Level')->enumValues())->end()->literal('AbstractHelp', '<hr/><p>YouTube and other services limit the length of your presentation\'s description. We will take the first 100 characters of your abstract to display in the YouTube description.</p>')->tinyMCEEditor('ShortDescription', 'Abstract (1000 chars)')->configure()->setRows(20)->setColumns(8)->setMaxCharLimit(1000)->setRequired(true)->end()->tinyMCEEditor('ProblemAddressed', 'What is the problem or use case you’re addressing in this session? (1000 chars)')->configure()->setRows(20)->setColumns(8)->setMaxCharLimit(1000)->setRequired(true)->end()->tinyMCEEditor('AttendeesExpectedLearnt', 'What should attendees expect to learn? (1000 chars)')->configure()->setRows(20)->setColumns(8)->setMaxCharLimit(1000)->setRequired(true)->end()->tinyMCEEditor('SelectionMotive', 'Why should this session be selected? (1000 chars)')->configure()->setRows(20)->setColumns(8)->setMaxCharLimit(1000)->setRequired(true)->end()->literal('PresentationMaterialsTitle', '<h3>Please provide any relevant links to additional information, such as code repositories, case studies, papers, blog posts etc. (Up to 5 links)</h3>')->text('PresentationLink[1]', '#1')->text('PresentationLink[2]', '#2')->text('PresentationLink[3]', '#3')->text('PresentationLink[4]', '#4')->text('PresentationLink[5]', '#5')->literal('HR', '<hr/>')->optionset('CategoryID', 'What is the general topic of the presentation?')->configure()->setSource($categorySource)->end()->text('OtherTopic', 'Other topic (if one above does not match)')->configure()->displayIf('CategoryID')->isEqualTo('other')->end()->end()->hidden('ID', 'ID');
     return $fields;
 }
コード例 #2
0
 public function equivalencias($id)
 {
     $presentation = Presentation::find($id);
     $equiv = $presentation->equiv->load(['detAtr' => function ($query) {
         $query->orderBy('atribute_id', 'asc');
     }, 'product']);
 }
コード例 #3
0
 /**
  * Run the task
  * @param  SS_HTTPRequest $request 	 
  */
 public function index()
 {
     $list = Presentation::get()->filter(array('Progress' => 0));
     $count = $list->count();
     $list->removeAll();
     $this->writeOut("Deleted {$count} presentations");
 }
コード例 #4
0
 public function scopePresentation($query, $id)
 {
     $presentation = Presentation::lists('name', 'id');
     if ($id != "" && isset($presentation[$id])) {
         $query->where('presentation_id', $id);
     }
 }
コード例 #5
0
 public function handleManagePresentation(SS_HTTPRequest $r)
 {
     if ($presentation = Presentation::get()->byID($r->param('ID'))) {
         $request = PresentationAPI_PresentationRequest::create($presentation, $this);
         return $request->handleRequest($r, DataModel::inst());
     }
     return $this->httpError(404, "Presentation " . $r->param('ID') . " not found");
 }
コード例 #6
0
 protected function getPresentationFields()
 {
     $categorySource = Summit::get_active()->Categories()->map('ID', 'FormattedTitleAndDescription')->toArray();
     $categorySource['other'] = '<h4 class="category-label">Other topic...</h4>';
     $fields = FieldList::create()->text('Title', 'Proposed Presentation Title')->configure()->setAttribute('autofocus', 'TRUE')->end()->dropdown('Level', 'Please select the level of your presentation content')->configure()->setEmptyString('-- Select one --')->setSource(Presentation::create()->dbObject('Level')->enumValues())->end()->tinyMCEEditor('Description', 'Abstract')->configure()->setRows(20)->end()->literal('ShortDescriptionHelp', '<hr/><p>YouTube and other services limit the length of your presentation\'s description. Please provide a shorter, YouTube-friendly summary below.</p>')->literal('ShortDescriptionWordCount', '<p id="word-count"></p>')->tinyMCEEditor('ShortDescription', 'Short Description (450 Word Max)')->configure()->setRows(7)->setWordCount(450)->end()->literal('HR', '<hr/>')->optionset('CategoryID', 'What is the general topic of the presentation?')->configure()->setSource($categorySource)->end()->text('OtherTopic', 'Other topic (if one above does not match)')->configure()->displayIf('CategoryID')->isEqualTo('other')->end()->end()->literal('TagHelp', '<p>You can optionally add tags help attendees find presentations that interest them. Examples: <i>nova, ubuntu, ldap.</i></p>')->bootstrapTag('Tags', 'Presentation Tags (Optional)')->configure()->setLabelField('Tag')->setSource(Tag::get())->setPrefetch(Tag::get()->leftJoin('Presentation_Tags', 'TagID = Tag.ID')->sort('COUNT(Tag.ID)', 'DESC')->limit(10)->alterDataQuery(function ($query) {
         $query->groupby('Tag.ID');
     }))->setFreeInput(true)->end();
     return $fields;
 }
コード例 #7
0
function launchPresentation($paramstring, $params = array())
{
    global $wgTitle, $wgParser;
    $wgParser->disableCache();
    $title = $wgTitle->getText();
    //only returns the title, not the namespace
    $slideNumber = 0;
    $notoc = "";
    $delimiter = ",";
    if (trim($paramstring) == "") {
        return "<br><font color=red><b>Please define at least one page to use this extention.</b></font>\n<hr>";
    }
    // set default then check for user supplied name...
    $name = "Wiki Presentation";
    if (isset($params['name'])) {
        $name = $params['name'];
    }
    //disable toc per tag params
    if (isset($params['notoc'])) {
        $notoc = "__NOTOC__";
    }
    if (isset($params['delimiter'])) {
        $delimiter = $params['delimiter'];
        //$delimiter = str_replace("\n",chr(13),$delimiter);
    }
    // clean up the string; replace whitespace with a single space
    $paramstring = preg_replace('@\\s+@', " ", $paramstring);
    $slides = split($delimiter, trim($paramstring));
    // remove any blank array values
    foreach ($slides as $slide) {
        if (trim($slide) != "") {
            $arr[] = trim($slide);
        }
    }
    // cookie is set via back or forward arrows
    $cookie_name = str_replace(" ", "_", "wiki_presentation_{$title}");
    if (isset($_COOKIE[$cookie_name])) {
        $slideNumber = $_COOKIE[$cookie_name];
    }
    // generate the Presentation class
    $cPresentation = new Presentation($arr, $slideNumber, $name, $notoc);
    // dislay the presentation
    return $cPresentation->getHTML();
}
コード例 #8
0
 /**
  * Returns true if the user is a speaker in a given presentation
  * @param boolean
  */
 public function IsSpeaker($presentation = null)
 {
     if ($presentation === null) {
         return Presentation::get()->relation('Speakers')->find('MemberID', $this->owner->ID);
     }
     if (is_numeric($presentation)) {
         $p = Presentation::get()->byID($presentation);
     } else {
         if ($presentation instanceof Presentation) {
             $p = $presentation;
         }
     }
     if ($p) {
         return $p->Speakers()->find('MemberID', $this->owner->ID);
     }
 }
コード例 #9
0
 /**
  * @param int $summit_id
  * @param int $page
  * @param int $page_size
  * @param array $order
  * @return array
  */
 public function getUnpublishedBySummitAndTrackList($summit_id, $track_list = null, $search_term = null, $page = 1, $page_size = 10, $order = null)
 {
     if (is_null($order)) {
         $order = array('SummitEvent.Created' => 'ASC');
     }
     $filter = array('SummitID' => $summit_id, 'Published' => 0);
     $track_filter = '';
     if (!empty($track_list)) {
         $track_filter = " AND SummitSelectedPresentationList.ID = {$track_list} ";
     }
     $where_clause = " SummitEvent.Title IS NOT NULL AND SummitEvent.Title <>'' ";
     if ($search_term) {
         $where_clause .= "AND (SummitEvent.Title LIKE '%{$search_term}%' OR SummitEvent.Description LIKE '%{$search_term}%'";
         $where_clause .= " OR PresentationSpeaker.FirstName LIKE '%{$search_term}%' OR PresentationSpeaker.LastName LIKE '%{$search_term}%'";
         $where_clause .= " OR CONCAT(PresentationSpeaker.FirstName,' ',PresentationSpeaker.LastName) LIKE '%{$search_term}%' ) ";
     }
     $list = Presentation::get()->filter($filter)->where($where_clause)->leftJoin('Presentation_Speakers', 'Presentation_Speakers.PresentationID = Presentation.ID')->leftJoin('PresentationSpeaker', 'Presentation_Speakers.PresentationSpeakerID = PresentationSpeaker.ID')->innerJoin('SummitSelectedPresentation', 'SummitSelectedPresentation.PresentationID = Presentation.ID')->innerJoin('SummitSelectedPresentationList', "SummitSelectedPresentation.SummitSelectedPresentationListID = SummitSelectedPresentationList.ID AND (ListType = 'Group') {$track_filter}")->sort("TRIM({$order})");
     $count = intval($list->count());
     $offset = ($page - 1) * $page_size;
     $data = $list->limit($page_size, $offset);
     return array($page, $page_size, $count, $data);
 }
コード例 #10
0
 protected function getPresentationFields()
 {
     $private_groups = $this->presentation_manager->getPrivateCategoryGroupsFor(Member::currentUser(), $this->summit);
     if ($this->summit->isCallForSpeakersOpen()) {
         $public_groups = $this->summit->CategoryGroups()->filter('ClassName', 'PresentationCategoryGroup')->toArray();
         $category_groups = array_merge($public_groups, $private_groups);
     } else {
         $category_groups = $private_groups;
     }
     $category_groups_map = array();
     foreach ($category_groups as $group) {
         $group_type = $group->ClassName == 'PrivatePresentationCategoryGroup' ? 'private' : 'public';
         $category_groups_map[] = array('id' => $group->ID, 'title' => $group->Name, 'group_type' => $group_type);
     }
     usort($category_groups_map, function ($a, $b) {
         return strcmp($a["title"], $b["title"]);
     });
     $fields = FieldList::create()->text('Title', 'Proposed Presentation Title')->configure()->setAttribute('autofocus', 'TRUE')->end()->dropdown('TypeID', 'Select the format (Presentation: Max 3 speakers; Panel: Max 4 speakers, 1 moderator)')->configure()->setEmptyString('-- Select one --')->setSource(PresentationType::get()->filter('SummitID', $this->summit->ID)->exclude('Type', 'Keynotes')->map('ID', 'Type'))->end()->literal('CategoryContainer', '<div id="category_options"></div>')->dropdown('Level', 'Select the technical level of your presentation content')->configure()->setEmptyString('-- Select one --')->setSource(Presentation::create()->dbObject('Level')->enumValues())->end()->literal('AbstractHelp', '<hr/><p>YouTube and other services limit the length of your presentation\'s description. We will take the first 100 characters of your abstract to display in the YouTube description.</p>')->tinyMCEEditor('ShortDescription', 'Abstract (1000 chars)')->configure()->setRows(20)->setColumns(8)->end()->tinyMCEEditor('ProblemAddressed', 'What is the problem or use case you’re addressing in this session? (1000 chars)')->configure()->setRows(20)->setColumns(8)->end()->tinyMCEEditor('AttendeesExpectedLearnt', 'What should attendees expect to learn? (1000 chars)')->configure()->setRows(20)->setColumns(8)->end()->literal('PresentationMaterialsTitle', '<h3>Please provide any relevant links to additional information, such as code repositories, case studies, papers, blog posts etc. (Up to 5 links)</h3>')->text('PresentationLink[1]', '#1')->text('PresentationLink[2]', '#2')->text('PresentationLink[3]', '#3')->text('PresentationLink[4]', '#4')->text('PresentationLink[5]', '#5')->hidden('ID', 'ID')->hidden('SummitID', '', $this->summit->ID)->hidden('CategoryIDbis', '');
     $CategoryGroupField = new CategoryGroupField('GroupID', 'Select the <a href="' . $this->summit->Link . 'categories" target="_blank">Summit Category</a> of your presentation');
     $CategoryGroupField->setSource($category_groups_map);
     $fields->insertAfter($CategoryGroupField, 'TypeID');
     return $fields;
 }
コード例 #11
0
 public function run($request)
 {
     $summit_id = intval($request->requestVar('SummitID'));
     if ($summit_id <= 0) {
         throw new RuntimeException("invalid summit id");
     }
     $summit = Summit::get()->byID($summit_id);
     if (is_null($summit)) {
         throw new RuntimeException("invalid summit");
     }
     $count = 0;
     $presentations = Presentation::get()->filter(array('SummitID' => $summit_id, 'TypeID' => 0))->where(" Title IS NOT NULL AND Title <>'' ");
     Summit::seedBasicEventTypes($summit_id);
     $type = SummitEventType::get()->filter(array('Type' => 'Presentation', 'SummitID' => $summit_id))->first();
     if (is_null($type)) {
         throw new RuntimeException("invalid event type");
     }
     foreach ($presentations as $p) {
         $p->TypeID = $type->ID;
         $p->write();
         ++$count;
     }
     echo "Fixed {$count} presentations.";
 }
コード例 #12
0
 /**
  * Reverses the migration
  */
 public function doDown()
 {
     foreach (Presentation::get()->filter('Legacy', true) as $p) {
         $p->Speakers()->setByIdList(array());
         foreach ($p->Materials()->filter('ClassName', 'PresentationVideo') as $material) {
             echo "Deleted video # " . $material->ID . $this->br();
             $material->delete();
         }
         echo "Deleted presentation # " . $p->ID . $this->br();
         $p->delete();
     }
     if (!Presentation::get()->filter('Legacy', true)->exists()) {
         echo "Deleted all legacy presentations" . $this->br();
     } else {
         echo "*** FAIL: Did not delete all legacy presentations" . $this->br();
     }
     foreach (PresentationSpeaker::get()->filter('Notes', '[LEGACY]') as $speaker) {
         $speaker->delete();
     }
     if (!PresentationSpeaker::get()->filter('Notes', '[LEGACY]')->exists()) {
         echo "Deleted all legacy speakers" . $this->br();
     } else {
         echo "*** FAIL: Did not delete all legacy speakers" . $this->br();
     }
     Summit::get()->filter('Title', ['San Diego', 'Portland', 'Atlanta'])->removeAll();
     if (!Summit::get()->filter('Title', ['San Diego', 'Portland', 'Atlanta'])->exists()) {
         echo "Deleted legacy summits" . $this->br();
     } else {
         echo "*** FAIL: Did not delete legacy summits" . $this->br();
     }
 }
コード例 #13
0
ファイル: index.php プロジェクト: ATCS-BCA/bca-apps
$current_date = time();
$action = filter_input(INPUT_GET, 'action');
$id = 0;
$register_id = 0;
$is_changing = $is_enrolled;
if ($action == "register") {
    if (!($current_date < $start_date || $current_date > $end_date) || isset($_SESSION['prev_usr_id'])) {
        $presentations = get_presentation_list($currentSession, $sort_by, $sort_order);
        include "view.php";
    } else {
        display_user_message("It's not time to enroll yet", "/" . $app_url_path . "/itinerary");
    }
} else {
    if ($action == "commit") {
        $pres_id = filter_input(INPUT_GET, 'pres_id');
        $presentation = Presentation::getPresentation($pres_id);
        // Error -- not time to sign up.
        if (!isset($_SESSION['prev_usr_id'])) {
            if ($current_date < $start_date || $current_date > $end_date) {
                display_user_message("It is not currently time to enroll.  Please check the enrollment dates.", "/" . $app_url_path . "/itinerary");
                exit;
            } else {
                if (!$presentation->has_space()) {
                    display_user_message("The presentation you selected is already full.  Please select another.", "/" . $app_url_path . "/itinerary");
                    exit;
                }
            }
        }
        // All good -- add the presentation!
        //    echo "add";
        $presentation->addPresForUser($user->usr_id);
コード例 #14
0
         return;
     }
     $company_id = $item->ID;
     $event = new SummitEntityEvent();
     $event->EntityClassName = 'SponsorFromEvent';
     $event->EntityID = $company_id;
     $event->Type = 'DELETE';
     $event->OwnerID = Member::currentUserID();
     $event->SummitID = $summit_event->SummitID;
     $event->Metadata = json_encode(array('event_id' => $event_id));
     $event->write();
 }
 if ($item instanceof PresentationSpeaker && $list->getJoinTable() === 'Presentation_Speakers') {
     // removed speaker from presentation
     $presentation_id = intval($list->getForeignID());
     $presentation = Presentation::get()->byID($presentation_id);
     if (is_null($presentation)) {
         return;
     }
     $speaker_id = $item->ID;
     $event = new SummitEntityEvent();
     $event->EntityClassName = 'SpeakerFromPresentation';
     $event->EntityID = $speaker_id;
     $event->Type = 'DELETE';
     $event->OwnerID = Member::currentUserID();
     $event->SummitID = $presentation->SummitID;
     $event->Metadata = json_encode(array('event_id' => $presentation_id));
     $event->write();
 }
 if ($item instanceof SummitType && $list->getJoinTable() === 'SummitEvent_AllowedSummitTypes') {
     // removed summit type from event
コード例 #15
0
ファイル: listpresentation.php プロジェクト: alencarmo/OCF
 function gener(&$view)
 {
     $view->setEmpty($isEmpty = parent::gener($view));
     return $isEmpty;
 }
コード例 #16
0
 public function hasEventsPublished()
 {
     return Presentation::get()->filter(["SummitID" => $this->SummitID, "Published" => 1, "CategoryID" => $this->ID])->count() > 0;
 }
コード例 #17
0
ファイル: index_ii.php プロジェクト: rb-ma/myaarth
	}

</style>

<body>
	<div class="container">
		<div class="content">
			<div class="page-header" style="height:100px;">
				<?php 
Presentation::outputHeader();
?>
				<div id="moneyTreeImage" style="position:relative;padding-left:63%;padding-right:0%;top:-100px;width:200px;z-index:10;">
					<img src="/Style/Images/MoneyTreeSmall.png">
				</div>				
			</div>
			<div style="vertical-align=center;">
				<img height=150 width=150 src="/Style/Images/construction.jpg" alt="Construction" style="padding-top:5%;padding-left:6%;float:left;margin:0 5px 0 0 0;"/>
				<p style="padding-left:19%; padding-right:0%;padding-top:10%; font-family:Calibri; font-size:20px;">Apologies...our site is currently undergoing renovations.</p>
                <p style="padding-left:19%; padding-right:0%;padding-top:3%; font-family:Calibri; font-size:20px;">For institutional investors interested in our library of financial functions (analytics, trading, customizations etc.), please contact us at <a href='mailto:contact@myaarth.com'>contact@myaarth.com</a></p>
			</div>
		</div>
		<?php 
Presentation::outputFooterConstruction();
?>
    </div> <!-- /container -->
		

</body>
</html>

コード例 #18
0
 /**
  * @param null $summit_id
  * @param string $role
  * @return ArrayList|bool
  */
 public function AlternatePresentations($summit_id = null, $role = IPresentationSpeaker::RoleSpeaker)
 {
     $alternatePresentations = new ArrayList();
     $summit = is_null($summit_id) ? Summit::get_active() : Summit::get()->byID($summit_id);
     if (is_null($summit)) {
         return false;
     }
     $presentations = $role == IPresentationSpeaker::RoleSpeaker ? $this->Presentations()->filter('SummitEvent.SummitID', $summit->ID) : Presentation::get()->filter(['SummitEvent.SummitID' => $summit->ID, 'ModeratorID' => $this->ID]);
     foreach ($presentations as $p) {
         if ($p->SelectionStatus() == IPresentation::SelectionStatus_Alternate && !$p->isPublished()) {
             $alternatePresentations->push($p);
         }
     }
     return $alternatePresentations;
 }
コード例 #19
0
ファイル: authenticate.php プロジェクト: rb-ma/myaarth
  <body>
    <div class="container">

      <div class="content">
        <div class="page-header" style="height:100px;">
		<?php 
Presentation::outputHeader();
?>
		<div id="moneyTreeImage" style="position:relative;left:400px;top:-70px;width:200px;">
		</div>
        </div>
        <div class="row">
          <div class="span11">
			<h3>Account Confirmed</h3><br/>
			<p>Your account has been confirmed!</p>
			<p>Click the button below to go to the home page, and log in.</p>
			<button class="btn primary" id="homePage">Go to home page</button>
          </div>
        </div>
      </div>

	<?php 
Presentation::outputFooter();
?>

    </div> <!-- /container -->

  </body>
</html>
コード例 #20
0
 public function getPresentationById($event_id)
 {
     return Presentation::get_by_id('Presentation', $event_id);
 }
コード例 #21
0
 /**
  * A helper method that sniffs the request for a number of parameters
  * that could contain the presentation ID
  * 
  * @return  Presentation
  */
 protected function getPresentationFromRequest()
 {
     $presentation = false;
     if ($this->request->param('ID')) {
         $presentation = Presentation::get()->byID($this->request->param('ID'));
     }
     if (!$presentation && $this->request->requestVar('PresentationID')) {
         $presentation = Presentation::get()->byID($this->request->requestVar('PresentationID'));
     }
     return $presentation;
 }
コード例 #22
0
 function SaveRating()
 {
     if (!Member::currentUserID()) {
         return Security::permissionFailure($this);
     }
     $rating = '';
     $TalkID = '';
     if (isset($_GET['rating']) && is_numeric($_GET['rating'])) {
         $rating = $_GET['rating'];
     }
     if (isset($_GET['id']) && is_numeric($_GET['id'])) {
         $presentationID = $_GET['id'];
     }
     $Member = member::currentUser();
     $validRatings = array(-1, 0, 1, 2, 3);
     if ($Member && isset($rating) && in_array((int) $rating, $validRatings, true) && $presentationID) {
         $previousVote = PresentationVote::get()->filter(array('PresentationID' => $presentationID, 'MemberID' => $Member->ID))->first();
         $presentation = Presentation::get()->byID($presentationID);
         $CategoryID = Session::get('CategoryID');
         if (!$previousVote) {
             $vote = new PresentationVote();
             $vote->PresentationID = $presentationID;
             $vote->Vote = $rating;
             $vote->IP = $this->ClientIP();
             $vote->MemberID = $Member->ID;
             $vote->write();
             $this->redirectBack();
         } else {
             $previousVote->Vote = $rating;
             $previousVote->IP = $this->ClientIP();
             $previousVote->write();
             $this->redirectBack();
         }
     } else {
         return 'no rating saved.';
     }
 }
コード例 #23
0
<?php

namespace Pages;

require __DIR__ . '../../../core/initialize.php';
class Presentation extends \PageHelper
{
    public $arrayTemplate = [];
    public $strTemplate = "Presentation.html5.twig";
    public function run()
    {
        $view = $this->template->render($this->arrayTemplate);
        $this->response->setContent($view);
        $this->response->send();
    }
}
$class = new Presentation();
$class->run();
コード例 #24
0
 public function MyPresentations($summit_id = null)
 {
     $summit = is_null($summit_id) ? Summit::get_active() : Summit::get()->byID($summit_id);
     if (is_null($summit)) {
         return false;
     }
     return Presentation::get()->filter(array('CreatorID' => $this->MemberID, 'SummitID' => $summit->ID));
 }
コード例 #25
0
ファイル: index_old.php プロジェクト: rb-ma/myaarth
					<div style="margin-top:20px;">
						<div style="float:left;clear:none;margin-right:10px;"><small ><strong>Password Strength: </strong></small></div>
						<span class="strengthSpan empty" style="float:left;clear:right"></span>
					</div>
					<div style="margin-top:10px;">
					
					</div>
					<br/><br/>
					I accept Aarth's <a href="javascript:void(0)" id="termsOfServiceLink">Terms of Service</a>. <input type="checkbox" id="acceptTOS"/><br/><br/>
					<button class="btn success span4" id="registerButton">Register</button>
			</div>
          </div>
        </div>
		
<footer>
        <p><center><?php 
Presentation::outputFooterNoMenu();
?>
</center></p>
      </footer>
      </div>




	<div class="rightFade"></div>
	    </div> <!-- /container -->
		      
  </body>
</html>
コード例 #26
0
 public function handleReorderList(SS_HTTPRequest $r)
 {
     $sortOrder = $r->postVar('sort_order');
     $listID = $r->postVar('list_id');
     $list = SummitSelectedPresentationList::get()->byId($listID);
     if (!$list->memberCanEdit()) {
         return new SS_HTTPResponse(null, 403);
     }
     if (is_array($sortOrder)) {
         foreach ($sortOrder as $key => $id) {
             $selection = SummitSelectedPresentation::get()->filter(array('PresentationID' => $id, 'SummitSelectedPresentationListID' => $listID));
             // Add the selection if it's new
             if (!$selection->exists()) {
                 $presentation = Presentation::get()->byId($id);
                 if ($presentation->exists() && $presentation->CategoryID == $list->CategoryID) {
                     $s = new SummitSelectedPresentation();
                     $s->SummitSelectedPresentationListID = $listID;
                     $s->PresentationID = $presentation->ID;
                     $s->MemberID = Member::currentUserID();
                     $s->Order = $key + 1;
                     $s->write();
                 }
             }
             // Adjust the order if not
             if ($selection->exists()) {
                 $s = $selection->first();
                 $s->Order = $key + 1;
                 $s->write();
             }
         }
     }
     return new SS_HTTPResponse(null, 200);
 }
コード例 #27
0
ファイル: Summit.php プロジェクト: Thingee/openstack-org
 /**
  * @param $event_id
  * @return SummitEvent
  * @throws Exception
  */
 public function getEventFromSchedule($event_id)
 {
     $event = $this->Events()->filter(array('Published' => 1, 'ID' => $event_id))->first();
     if ($event->ClassName == 'Presentation') {
         $event = Presentation::get()->byID($event_id);
     }
     return $event;
 }
コード例 #28
0
ファイル: tracker_v1.php プロジェクト: rb-ma/myaarth
		<p>
			Would you like to proceed?
		</p>
	</div>
    <div class="modal-footer">
		<a href="#" class="btn primary" id="proceedWithInconsistency">Proceed</a>
		<a href="#" class="btn" id="cancelInconsistency">Cancel</a>
    </div>
    </div>

    <div class="container">

      <div class="content">
        <div class="page-header" style="height:100px;">
		<?php 
Presentation::outputHeader();
?>
		<div id="moneyTreeImage" style="position:relative;left:420px;top:-100px;width:200px;z-index:10;">
			<img src="/Style/Images/MoneyTreeSmall.png">
		</div>
        </div>
        <div class="row">
          <div class="span11">
			<input type="search" id="searchTextBox" value="Enter Symbol" data-default-value="Enter Symbol"> <button id="finishButton" class="btn success">Save Portfolio</button> <button class="btn primary" id="refreshPage">Get Last Portfolio</button> <button id="resetPortfolioButton" class="btn error" style="z-index:99999">Empty Portfolio</button>
			<div id="dateTrackerDiv" class="span11">
				<table class="span11" id="preferencesTable">
				<thead>
				<tr><th>Date</th><th>Preferred Email Address</th><th>Email Frequency</th></tr>
				</thead>
				<tbody>
					<tr>
コード例 #29
0
 public function addPresForUser($usr_id)
 {
     // begin transaction
     global $db;
     $db->beginTransaction();
     try {
         // Check if the user currently has a presentation for this session.
         // If so, remove it.
         // The loop is a bit of overkill, but in case of an erroneous situation of the user having multiple
         // presentations for the same session, this will remove those extra cases.
         //
         // Include a check to make sure that presenters don't overwrite their presentations through this method.
         $presentations = get_presentations_by_user_by_session($usr_id, $this->ses_id);
         foreach ($presentations as $presentation) {
             Presentation::deletePresentationsByUser($usr_id, $presentation['pres_id']);
         }
         // Inserts the new session for the user.
         $this->insert_presentation_for_user($usr_id);
         // commit transaction
         $db->commit();
     } catch (PDOException $e) {
         // roll back transaction
         $db->rollback();
         // log any errors to file
         log_pdo_exception($e, $usr_id, "Adding Presentation:" . $this, "addPresForUser");
         display_db_exception($e);
         // display_error("Error saving data.");
         exit;
     }
 }
コード例 #30
0
 public function getPresentationLevels()
 {
     return Presentation::getLevels();
 }