function __construct($templateName, $to, $subject, $params = null, $from = null, $replyto = null) { $this->templateLocation = gcr::emailTemplateDir; $this->templateName = $templateName; if ($params) { $this->params = $params; } else { $this->params = array(); } if (is_array($to)) { $this->to = implode(",", $to); } else { $this->to = $to; } $this->subject = $subject; if ($from) { $this->from = $from; } else { $this->from = gcr::gcEschoolNotification; } $this->replyto = $replyto; $this->bcc = "*****@*****.**"; // include handy html segments which get used by numerous emails we send. $this->params['header_image'] = '<p><a href="http://' . gcr::frontPageDomain . '"><img style="border:none" src="' . GcrInstitutionTable::getHome()->getUrl() . '/images/gc3_logo.jpg" alt="" /></a></p>'; $this->params['powered_by_GC'] = '<p><a href="http://' . gcr::frontPageDomain . '"><img src="' . GcrInstitutionTable::getHome()->getUrl() . '/images/poweredbyGC.png" alt="" /></a></p>'; $this->params['contact'] = '<p><strong>Global Classroom Support</strong><br /><a href="mailto:support@globalclassroom.us" target="_blank">support@globalclassroom.us</a><br />(866) 535-3772</p>'; }
public static function userHasRole($user) { $user_obj = $user->getObject(); $mhr_user = $user->getUserOnInstitution(); if ($mhr_user && $user_obj) { if ($mhr_user->getApp()->isHome() || $mhr_user->getObject()->admin == 1) { $home_user = GcrInstitutionTable::getHome()->selectFromMhrTable('usr', 'username', $mhr_user->getObject()->username, true); if ($home_user) { return $home_user->staff == 1 || $home_user->admin == 1; } } } return false; }
public static function userHasRole($user) { $user_obj = $user->getObject(); $app = $user->getApp(); $flag = false; $mhr_user = $user->getUserOnInstitution(); if ($mhr_user && $user_obj) { if ($app->isHome() || $mhr_user->getObject()->staff == 1) { $home = GcrInstitutionTable::getHome(); $home_user_obj = $home->selectFromMhrTable('usr', 'username', $user_obj->username, true); if ($home_user_obj) { $home_user = new GcrMhrUser($home_user_obj, $home); $mhr_usr_institution = $home_user->getMhrUsrInstitutionRecords($home->getMhrInstitution()); if ($mhr_usr_institution) { $flag = $mhr_usr_institution->staff == 1; } } } } return $flag; }
public function assignSeller() { $app = $this->getPurchaseTypeApp(); $this->seller_id = 0; $this->seller_institution_id = $app->getInstitution()->getShortName(); if ($this->isCourse()) { if ($course = $app->getCourse($this->purchase_type_id)) { if ($mhr_user = $course->getSeller()) { $this->seller_id = $mhr_user->getObject()->id; $this->seller_institution_id = $mhr_user->getApp()->getShortName(); $this->save(); } } } else { if ($this->isEschool()) { $this->seller_institution_id = GcrInstitutionTable::getHome()->getShortName(); } } $this->save(); }
<h2>Verification</h2> <p> An email has been sent to <?php print $application->getContactObject()->getEmail(); ?> from <?php print gcr::gcEschoolNotification; ?> . Please click the link in this message to verify the email address for your new Stratus Platform. </p> <p> If you would like to us to resend the verification email, click <a href="<?php print GcrInstitutionTable::getHome()->getUrl() . '/institution/sendVerificationEmail?id=' . $application->getId(); ?> ">here</a>. </p>
public function executeSalePurchase(sfWebRequest $request) { global $CFG; $this->authorizePurchaseOnInstitution(); if (!$request->isMethod(sfRequest::POST)) { $this->redirect($CFG->current_app->getUrl()); } $form = $request->getPostParameters(); if (!($form['purchase_item'] && $form['token'])) { $this->redirect($CFG->current_app->getUrl()); } $this->form = new GcrPurchaseForm(); $this->form->setDefaults(array('purchase_type' => 'sale', 'purchase_type_id' => $form['purchase_item'], 'purchase_type_eschool_id' => GcrInstitutionTable::getHome()->getShortName(), 'bill_cycle' => 'single', 'purchase_token' => $form['token'])); // set up object which hold info about the purchase item to display on form $this->purchaseObject = new StdClass(); $this->hydratePurchaseObject($this->purchaseObject, 'sale', $form['purchase_item'], GcrInstitutionTable::getHome()->getShortName()); $this->getResponse()->setTitle('Purchase'); }
<td> <?php echo $newInstitutionForm['phone2_2']->render(); ?> </td> </tr> <tr><td colspan="3"> </td></tr> <tr> <td> </td> <td> </td> <td> <a href="" id="lightboxlinkeschool" rel="lightbox2" class="lbOn"> <input type="button" class="button" value="Create your Platform" /> </a> </td> </tr> </table> <div id="lightbox2" name="lightbox2" class="leightbox"> <h1>Creating Your Trial</h1> <p>We are attempting to create your trial Stratus Platform using the information you supplied. This process may take a few minutes to complete. You will be redirected when your Platform is ready. Thank you for creating your Platform with Global Classroom.</p> <div id="loader"> <img src="<?php print GcrInstitutionTable::getHome()->getUrl(); ?> /lib/leightbox/loader.gif" /> </div> </div> </form>
<?php // Template email for verifying a new institution. ?> <p> Your free trial Global Classroom Stratus Platform is ready to be created! </p> <p> To verify your email address, please click the link below. </p> <p> <a href="<?php print GcrInstitutionTable::getHome()->getUrl() . '/institution/verify?aid=' . $this->params['application']->getId() . '&verify=' . $this->params['application']->getVerifyHash(); ?> "> <?php print GcrInstitutionTable::getHome()->getUrl() . '/institution/verify?aid=' . $this->params['application']->getId() . '&verify=' . $this->params['application']->getVerifyHash(); ?> </a> </p> <p> </p> <br /> <?php print $this->params['powered_by_GC'];