Ejemplo n.º 1
0
 /**
  * mergeArrayWithFooter()
  * like the default merge array but add the footer accordingly.
  * It requires in the fields values: idcontact, firstname and lastname of the receiver
  * Merge an Array with a currently loaded email template
  * @param array $fields_values fields in format $fields['fieldname']=value;
  */
 function mergeArrayWithFooter($fields_values)
 {
     $bodytext = $this->getTemplateBodyText();
     $bodyhtml = $this->getTemplateBodyHtml();
     $msg = new Message();
     $unsubscribe_url = $GLOBALS['cfg_ofuz_site_http_base'] . 'unsub/' . $fields_values['idcontact'] . '/' . $_SESSION['do_User']->iduser;
     $fields_values['unsubscribe_url'] = $unsubscribe_url;
     $fields_values['sender_name'] = $_SESSION['do_User']->getFullName();
     $fields_values['receiver_name'] = $fields_values['firstname'] . " " . $fields_values['lastname'];
     if ($fields_values["flag"]) {
         if ($fields_values["flag"] == "unsubscribe_autoresponder") {
             //$unsubsribe_auto_responder = $this->getUnsubscribeAutoResponderLink($fields_values);
             //$bodytext .= $unsubsribe_auto_responder;
             //$bodyhtml .= $unsubsribe_auto_responder;
             $bodyhtml .= $this->getUnsubscribeAutoResponderLinkHTML($fields_values);
             $bodytext .= $this->getUnsubscribeAutoResponderLinkText($fields_values);
         }
     }
     $bodytext .= $msg->getMessage("email footer text");
     $bodyhtml .= $msg->getMessage("email footer html");
     $this->setBodyText(MergeString::withArray($bodytext, $fields_values));
     if (strlen($this->getTemplateBodyHtml()) > 5) {
         $this->setBodyHtml(MergeString::withArray($bodyhtml, $fields_values));
     }
     $this->setSubject(MergeString::withArray($this->getTemplateSubject(), $fields_values));
 }
Ejemplo n.º 2
0
 public function testSetGet()
 {
     $message = new Message('success', true);
     $this->assertEquals('success', $message->getMessage());
     $this->assertEquals(true, $message->hasSuccess());
     $message = new Message('failure', false);
     $this->assertEquals('failure', $message->getMessage());
     $this->assertEquals(false, $message->hasSuccess());
     $message->setMessage('success');
     $message->setSuccess(true);
     $this->assertEquals('success', $message->getMessage());
     $this->assertEquals(true, $message->hasSuccess());
     $record = $message->getRecordInfo();
     $this->assertEquals(array('message' => 'success', 'success' => true), $record->getData());
 }
Ejemplo n.º 3
0
 public function testSetGet()
 {
     $now = new \DateTime();
     $testCase = ['id' => 123, 'level' => 2, 'subject' => 'TEST SUBJECT', 'message' => 'TEST MESSAGE', 'source' => 'TEST_SOURCE', 'dateCreated' => $now, 'dateCreatedString' => $now->format(\DateTime::ISO8601)];
     $unit = new Message();
     $unit->setId($testCase['id']);
     $this->assertEquals($testCase['id'], $unit->getId());
     $unit->setLevel(0);
     $this->assertEquals(Message::LEVEL_DEFAULT, $unit->getLevel());
     $unit->setLevel($testCase['level']);
     $this->assertEquals($testCase['level'], $unit->getLevel());
     $unit->setSubject($testCase['subject']);
     $this->assertEquals($testCase['subject'], $unit->getSubject());
     $unit->setMessage($testCase['message']);
     $this->assertEquals($testCase['message'], $unit->getMessage());
     $unit->setSource('');
     $this->assertNull($unit->getSource());
     $unit->setSource($testCase['source']);
     $this->assertEquals($testCase['source'], $unit->getSource());
     $unit->setDateCreated(null);
     $this->assertNull($unit->getDateCreatedString());
     $unit->setDateCreated($testCase['dateCreated']);
     $this->assertEquals($testCase['dateCreated'], $unit->getDateCreated());
     $unit->setDateCreatedString($testCase['dateCreatedString']);
     $this->assertEquals($testCase['dateCreatedString'], $unit->getDateCreatedString());
     $this->assertEquals($testCase['id'], $unit->toArray()['id']);
     $this->assertTrue(is_array($unit->toArray()));
 }
Ejemplo n.º 4
0
 /**
  * @param Message $message
  *
  * @return bool
  */
 public function send(Message $message)
 {
     $headers = array();
     $post_data = array('auth' => $this->auth_token, 'originator' => $message->getFrom(), 'destination' => $message->getTo(), 'message' => $message->getMessage());
     $http_response = \Requests::post(self::API_ENDPOINT, $headers, $post_data);
     $gradwell_response = new Response($http_response->body);
     return $http_response->success && $gradwell_response->isSuccessful();
 }
Ejemplo n.º 5
0
 /**
  * Build Guzzle query options with json payload
  *
  * @param DeviceCollection $devices
  * @param Message $message
  * @return array
  */
 private function buildOptions($devices, $message)
 {
     $recipients = [];
     foreach ($devices as $device) {
         $recipients[]['gsm'] = $device->getNumber();
     }
     return ['debug' => false, 'timeout' => 10, 'json' => ['authentication' => ['username' => $this->config['username'], 'password' => $this->config['password']], 'messages' => [['sender' => $this->config['sender'], 'text' => $message->getMessage(), 'recipients' => $recipients]]]];
 }
Ejemplo n.º 6
0
 function testDefault()
 {
     $normal = new Message("Hi I'm a message");
     $field = new Message("hey", "contents");
     $bad = new Message(null);
     $this->assertEquals("Hi I'm a message", $normal->getMessage());
     $this->assertEquals("", $normal->getFieldName());
     $this->assertEquals("hey", $field->getMessage());
     $this->assertEquals("contents", $field->getFieldName());
     $this->assertEquals("", $bad->getMessage());
     $this->assertEquals("", $bad->getFieldName());
 }
Ejemplo n.º 7
0
 /**
  * Save mail message or messages in a folder to be sent at a later date
  *
  * @param string $to
  * @param string $format
  * @return Mail
  */
 public function saveTo($to = null, $format = null)
 {
     $dir = null !== $to ? $to : getcwd();
     if (null === $this->message->getMessage()) {
         $this->message->init();
     }
     $messageBody = $this->message->getMessage();
     $headers = $this->buildHeaders();
     // Send as group message
     if ($this->group) {
         $email = 'To: ' . (string) $this->queue . $this->message->getEol() . 'Subject: ' . $this->subject . $this->message->getEol() . $headers . $this->message->getEol() . $this->message->getEol() . $messageBody;
         $emailFileName = null !== $format ? $format : ($emailFileName = '000000001-' . time() . '-popphpmail');
         // Save the email message.
         file_put_contents($dir . DIRECTORY_SEPARATOR . $emailFileName, $email);
     } else {
         // Iterate through the queue and send the mail messages.
         $i = 1;
         foreach ($this->queue as $rcpt) {
             $fileFormat = null;
             $subject = $this->subject;
             $message = $messageBody;
             // Set the recipient parameter.
             $to = isset($rcpt['name']) ? $rcpt['name'] . " <" . $rcpt['email'] . ">" : $rcpt['email'];
             // Replace any set placeholder content within the subject or message.
             foreach ($rcpt as $key => $value) {
                 $subject = str_replace('[{' . $key . '}]', $value, $subject);
                 $message = str_replace('[{' . $key . '}]', $value, $message);
                 if (null !== $format) {
                     if (null !== $fileFormat) {
                         $fileFormat = str_replace('[{' . $key . '}]', $value, $fileFormat);
                     } else {
                         $fileFormat = str_replace('[{' . $key . '}]', $value, $format);
                     }
                 }
             }
             $email = 'To: ' . $to . $this->message->getEol() . 'Subject: ' . $subject . $this->message->getEol() . $headers . $this->message->getEol() . $this->message->getEol() . $message;
             if (null !== $fileFormat) {
                 $emailFileName = sprintf('%09d', $i) . '-' . time() . '-' . $fileFormat;
             } else {
                 $emailFileName = sprintf('%09d', $i) . '-' . time() . '-popphpmail';
             }
             // Save the email message.
             file_put_contents($dir . DIRECTORY_SEPARATOR . $emailFileName, $email);
             $i++;
         }
     }
     return $this;
 }
Ejemplo n.º 8
0
 /**
  * Method which actually sends a message to Gitter
  * @param  Message $message
  * @return GuzzleResponse
  */
 public function send($message)
 {
     $level = 'normal';
     if ($message->getColor() !== null) {
         $level = $this->parseColor($message->getColor());
     }
     // Prefix with 'Forum activity:'
     $content = '####Flarum activity ' . "\n\n";
     if ($message->getAuthor() !== null) {
         $content .= '@' . $message->getAuthor()->username . ' ';
     }
     $content .= $message->getMessage();
     $content = $this->parseLinksInMessage($content, $message->getLinksToParse());
     // Remove # for gutter because it will tryl to convert them into issue links
     $content = str_replace('iscussion #', 'iscussion ', $content);
     $data = ['form_params' => ['message' => $content, 'level' => $level]];
     return $this->postApi($data);
 }
Ejemplo n.º 9
0
 /**
  * Method which actually sends a message to Slack
  * @param  Message $message
  * @return void
  */
 public function send($message)
 {
     $this->prepareNotificationPayload();
     $this->setMessage($message->getMessage(), $message->getShort());
     $this->parseLinksInMessage($message->getLinksToParse());
     if ($message->getAuthor() !== null) {
         $this->setAuthor($message->getAuthor()->username, app('flarum.config')['url'] . "/u/{$message->getAuthor()->id}", $message->getAuthor()->avatar_url);
         if ($message->getAuthor()->isAdmin()) {
             $this->setColor('special');
         }
     }
     if ($message->getColor() !== null) {
         $this->setColor($message->getColor());
     }
     if ($message->getTitle() !== '') {
         $this->setTitle($message->getTitle());
     }
     $this->sendMessage();
 }
Ejemplo n.º 10
0
 protected function runPage()
 {
     try {
         $id = WebRequest::getInt("id");
         $hash = WebRequest::get("hash");
         // data validation
         $customer = Customer::getById($id);
         if ($customer == null) {
             throw new NonexistantObjectException();
         }
         $customer->confirmEmail($hash);
         // save
         $customer->save();
         Session::setLoggedInCustomer($id);
         $this->mSmarty->assign("content", Message::getMessage("mail-confirmed"));
     } catch (NonexistantObjectException $ex) {
         global $cScriptPath;
         $this->mHeaders[] = "Location: {$cScriptPath}";
     }
 }
Ejemplo n.º 11
0
 public function testGettersAndSetters()
 {
     foreach ($this->messages as $message) {
         $m = new Message();
         $m->setTitle($message['title']);
         $m->setMessage($message['message']);
         $m->setUrl($message['url']);
         $m->setUrlTitle($message['url_title']);
         $m->setPriority($message['priority']);
         $m->setSound($message['sound']);
         $m->setHtml($message['html']);
         $m->setDate(new \DateTime($message['date']));
         $this->assertEquals($message['title'], $m->getTitle());
         $this->assertEquals($message['message'], $m->getMessage());
         $this->assertEquals($message['url'], $m->getUrl());
         $this->assertEquals($message['url_title'], $m->getUrlTitle());
         $this->assertEquals($message['priority'], $m->getPriority());
         $this->assertEquals($message['sound'], $m->getSound());
         $this->assertEquals($message['html'], $m->getHtml());
         $this->assertEquals($message['date'], $m->getDate()->format('Y-m-d'));
     }
 }
Ejemplo n.º 12
0
echo _('select none');
?>
</a></span> )</span>
                </div>
                <div class="contentfull">
				<?php 
if (!is_resource($_SESSION['do_Contacts']->getResultSet())) {
    $_SESSION['do_Contacts']->query("SELECT * FROM " . $_SESSION['do_Contacts']->getSqlViewName() . " ORDER BY " . $_SESSION['do_Contacts']->sql_view_order . " LIMIT " . $_SESSION['do_Contacts']->sql_qry_start . "," . $_SESSION['do_Contacts']->sql_view_limit);
}
if (strlen($_SESSION['do_Contacts']->search_keyword) > 0 && $_SESSION['do_Contacts']->getNumRows() == 0) {
    echo '<br /><br />';
    $e_clear_search = new Event("do_Contacts->eventClearSearch");
    $data = array("click_here" => $e_clear_search->getLink(_('click here')));
    $msg = new Message();
    $msg->setData(array("click_here" => $e_clear_search->getLink(_('click here'))));
    $msg->getMessage("no_contact_found");
    $msg->displayMessage();
} else {
    $_SESSION['do_Contacts']->first();
    $OfuzList = new OfuzListContact($_SESSION['do_Contacts']);
    $OfuzList->setMultiSelect(true);
    $OfuzList->displayList();
}
?>
                </div>
				<div id="last_contact_loader"></div>
                </form>
    </td></tr></table>
    <div class="spacerblock_40"></div>
    <div class="layout_footer"></div>
</div>
Ejemplo n.º 13
0
 protected function runPage()
 {
     if (WebRequest::wasPosted()) {
         if (!WebRequest::postInt("calroom")) {
             $this->showCal();
             return;
         }
         $startdate = new DateTime(WebRequest::post("qbCheckin"));
         $enddate = new DateTime(WebRequest::post("qbCheckout"));
         $room = Room::getById(WebRequest::postInt("calroom"));
         for ($date = $startdate; $date < $enddate; $date->modify("+1 day")) {
             if (!$room->isAvailable($date)) {
                 $this->error("room-not-available");
                 $this->showCal();
                 return;
             }
         }
         // search for customer
         if (!($customer = Customer::getByEmail(WebRequest::post("qbEmail")))) {
             $customer = new Customer();
             $suTitle = WebRequest::post("qbTitle");
             $suFirstname = WebRequest::post("qbFirstname");
             $suLastname = WebRequest::post("qbLastname");
             $suAddress = WebRequest::post("qbAddress");
             $suCity = WebRequest::post("qbCity");
             $suPostcode = WebRequest::post("qbPostcode");
             $suCountry = WebRequest::post("qbCountry");
             $suEmail = WebRequest::post("qbEmail");
             $customer->setPassword($suEmail);
             // set values
             $customer->setTitle($suTitle);
             $customer->setFirstname($suFirstname);
             $customer->setSurname($suLastname);
             $address = new Address();
             $address->setLine1($suAddress);
             $address->setCity($suCity);
             $address->setPostCode($suPostcode);
             $address->setCountry($suCountry);
             $address->save();
             $customer->setAddress($address);
             $customer->setEmail($suEmail);
             // save it
             $customer->save();
             $customer->sendMailConfirm();
             // save it again
             $customer->save();
         }
         $booking = new Booking();
         $booking->setStartDate(WebRequest::post("qbCheckin"));
         $booking->setEndDate(WebRequest::post("qbCheckout"));
         $booking->setAdults(WebRequest::post("qbAdults"));
         $booking->setChildren(WebRequest::post("qbChildren"));
         $booking->setPromocode(WebRequest::post("qbPromoCode"));
         $booking->setRoom($room->getId());
         $booking->setCustomer($customer->getId());
         $booking->save();
         $msg = Message::getMessage("booking-confirmation");
         $msg = str_replace("\$1", $booking->getStartDate(), $msg);
         $msg = str_replace("\$2", $booking->getEndDate(), $msg);
         $msg = str_replace("\$3", $booking->getAdults(), $msg);
         $msg = str_replace("\$4", $booking->getChildren(), $msg);
         $msg = str_replace("\$5", $booking->getRoom()->getName(), $msg);
         Mail::send($customer->getEmail(), Message::getMessage("booking-confimation-subject"), $msg);
         $this->mSmarty->assign("content", $msg);
         return;
     }
     throw new YouShouldntBeDoingThatException();
 }
Ejemplo n.º 14
0
</div>
        <div class="banner50 pad020 text16 fuscia_text"><?php 
echo _('Google Gears Setup');
?>
</div>
        <div class="contentfull">
        <?php 
$UserSettings = new UserSettings();
$e_set_ggear = new Event("UserSettings->eventSetSetting");
$e_set_ggear->addParam("goto", $_SERVER['PHP_SELF']);
$e_set_ggear->addParam("setting_name", "google_gears");
echo '<div class="messageshadow">';
echo '<div class="messages">';
$msg = new Message();
if ($UserSettings->getSetting("google_gears") == 'Yes') {
    echo $msg->getMessage('google_gears');
    echo '<br />';
    $e_set_ggear->addParam("setting_value", "No");
    echo $e_set_ggear->getLink(_('Turn Off'));
} else {
    echo $msg->getMessage('google_gears');
    echo '<br />';
    $e_set_ggear->addParam("setting_value", "Yes");
    echo $e_set_ggear->getLink(_('Turn On'));
}
echo '</div></div>';
echo '<br />';
?>
        </div>
        <div class="solidline"></div>
    </td></tr></table>
Ejemplo n.º 15
0
        
    </td><td class="layout_rcolumn">
        <div class="banner60 pad020 text32"><?php 
echo _('Settings');
?>
</div>
        <div class="banner50 pad020 text16 fuscia_text"><?php 
echo _('Web Form Builder');
?>
</div>
        <div class="contentfull">
        <div class="messageshadow">
            <div class="messages">
            <?php 
$msg = new Message();
echo $msg->getMessage('web form creator instruction');
?>
            </div>
        </div><br />
        <?php 
$_SESSION['setting_mode'] = 'Yes';
if (isset($_GET['edit']) && $_GET['edit'] != '') {
    $_SESSION['do_userform']->getId($_GET['edit']);
    $do_userform->iduser = $_SESSION['do_User']->iduser;
    $do_userform->setRegistry("webformuser");
    $do_userform->newUpdateForm('do_userform');
    $do_userform->form->addEventAction('do_userform->eventDeleteWebFormFields', 2100);
    $do_userform->form->addEventAction('do_userform->eventAddFormFields', 2103);
    $do_userform->form->goto = 'contact_web_form_url.php';
    echo $do_userform->form->getFormHeader();
    echo $do_userform->form->getFormEvent();
Ejemplo n.º 16
0
		  
		<div class="banner60 pad020 text32"><?php 
echo _('Settings');
?>
</div>
        <div class="banner50 pad020 text16 fuscia_text"><?php 
echo _('My Information');
?>
</div>
        <div class="contentfull">
        
        <?php 
if ($_GET['message']) {
    $message = new Message();
    if ($_GET['message'] == 'reg_duplicate_email') {
        $message->getMessage("reg_duplicate_email");
    } else {
        $message->setContent($_GET['message']);
    }
    $message->displayMessage();
}
$f_user = new User();
$f_user->getId($_SESSION['do_User']->iduser);
$f_regForm = $f_user->prepareSavedForm("OfuzUserInfoUpdateForm");
$f_regForm->setFormEvent("do_User->eventUpdateUserInfo");
$f_regForm->addEventAction("do_User->eventValidationOnUpdate", 10);
$f_regForm->addParam("errPage", 'settings_info.php');
$f_regForm->setForm();
$f_regForm->execute();
?>
        </div>
Ejemplo n.º 17
0
    echo '<div class="right_20_top_0">', $button_add_invoice->CreateButton('/upgrade_your_account.php?msg=' . $_SESSION['do_User']->plan . '_i', _('create new invoice'), '', '', 'dyn_button_add_new_invoice', 'width:150px;'), '</div>';
}
?>
        </div>

        <div id="inv_msgs">
		    <?php 
if ($_SESSION['inv_past_due_hide'] == 'Yes') {
    $do_invoice_check = new Invoice();
    $msg = new Message();
    if ($do_invoice_check->hasInvoices()) {
        if ($msg->getMessageFromContext("invoice list")) {
            echo $msg->displayMessage();
        }
    } else {
        $msg->getMessage("invoice first time");
        echo $msg->displayMessage();
    }
    $do_invoice_check->free();
}
?>
        </div>
        <div id="show_past_due"></div>
              <?php 
if ($_SESSION['inv_past_due_hide'] != 'Yes' && $_SESSION['do_invoice_list']->from_invoice_page === true) {
    //echo '<br /><br />';
    echo $_SESSION['do_invoice_list']->getInvoicesPastDue();
}
if ($do_payment_inv->getExtraAmoutNotPaid() !== false && $_SESSION['extra_amt'] == '') {
    echo '<br />';
    echo '<div style="margin-left:0px;">';
<table class="layout_columns"><tr><td class="layout_lmargin"></td><td>
<div class="layout_content">
<?php 
$thistab = '';
include_once 'includes/ofuz_navtabs.php';
$do_breadcrumb = new Breadcrumb();
$do_breadcrumb->getBreadcrumbs();
?>
    <div class="grayline1"></div>
    <div class="spacerblock_20"></div>
    <?php 
if ($access === false) {
    $msg = new Message();
    echo '<div class="messageshadow_unauthorized">';
    echo '<div class="messages_unauthorized">';
    echo $msg->getMessage("unauthorized email template access");
    echo '<br /><a href="/settings_email_templ.php">Go Back</a>';
    echo '</div></div><br /><br />';
    exit;
}
if ($_SESSION['in_page_message'] != '') {
    echo '<div style="margin-left:0px;">';
    echo '<div class="messages_unauthorized">';
    echo htmlentities($_SESSION['in_page_message']);
    $_SESSION['in_page_message'] = '';
    echo '</div></div><br /><br />';
}
?>
 
    <table class="layout_columns"><tr><td class="layout_lcolumn settingsbg">
        <div class="settingsbar"><div class="spacerblock_16"></div>
Ejemplo n.º 19
0
<?php 
$do_feedback = new Feedback();
$do_feedback->createFeedbackBox();
?>
<table class="layout_columns"><tr><td class="layout_lmargin"></td><td>
<div class="layout_content">
<?php 
$thistab = _('Invoices');
include_once 'includes/ofuz_navtabs.php';
$do_breadcrumb = new Breadcrumb();
$do_breadcrumb->getBreadcrumbs();
if (!$invoice_access) {
    $msg = new Message();
    echo '<div class="messageshadow_unauthorized">';
    echo '<div class="messages_unauthorized">';
    echo $msg->getMessage("unauthorized_invoice_access");
    echo '</div></div><br /><br />';
    exit;
}
// Main Invoice Form
$f_invoiceForm = new Event("InvoiceEditSave->eventValuesFromForm");
$f_invoiceForm->setLevel(1999);
//$f_invoiceForm->addEventAction("InvoiceEditSave->checkEmptyDueDate", 1999);
$f_invoiceForm->addEventAction("InvoiceEditSave->eventUpdateInvoice", 2000);
$f_invoiceForm->addEventAction("InvoiceLine->eventSaveInvoiceLine", 2200);
$f_invoiceForm->addEventAction("InvoiceEditSave->eventCheckContactChanged", 2201);
$f_invoiceForm->addEventAction("InvoiceEditSave->eventSetInvoiceCalculation", 2210);
$f_invoiceForm->addParam("id", $_SESSION['InvoiceEditSave']->idinvoice);
$f_invoiceForm->addParam("contact", $_SESSION['InvoiceEditSave']->idcontact);
$f_invoiceForm->addParam("goto", "invoice.php");
echo $f_invoiceForm->getFormHeader();
Ejemplo n.º 20
0
?>
 
    <div class="grayline1"></div>
    <div class="spacerblock_20"></div>
    <div class="mainheader">
        <div class="pad20">
            <span class="headline11"><?php 
_('Opt-out');
?>
</span>
        </div>
    </div>
    <div class="contentfull">
	<!--	<div class="messageshadow">
            <div class="messages">  -->
            <?php 
$msg = new Message();
$sender_name = $_SESSION['user_unsub']->getFullName();
$msg->setData(array("user_name" => $sender_name));
$msg->getMessage("contact unsubscribe email");
$msg->displayMessage();
?>
      <!--      </div>
        </div> -->

    </div>
    <div class="spacerblock_40"></div>
    <div class="layout_footer"></div>
</div>
</td><td class="layout_rmargin"></td></tr></table>
Ejemplo n.º 21
0
<?php

$user = new User();
$message = new Message();
$m1 = $message->getMessage();
$privilege = new Privilege();
$role = $privilege->judge($user);
?>
<nav class="navbar navbar-default navbar-fixed-top">
  <div class="container-fluid">
    <div class="row">
      <div class="col-md-10 col-md-offset-1">
            <!-- Brand and toggle get grouped for better mobile display -->
        <div class="navbar-header">
          <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </button>
          <a class="navbar-brand" href="index.php"><i class="fa fa-leaf icon-leaf green"></i></a>
        </div>

        <!-- Collect the nav links, forms, and other content for toggling -->
        <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
          <ul class="nav navbar-nav">
            <li class="dropdown">
              <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">分布式课程<span class="caret"></span></a>
              <ul class="dropdown-menu">
                <li><a href="course.php">课程首页</a></li>
                <li role="separator" class="divider"></li>
Ejemplo n.º 22
0
    <div class="grayline1"></div>
    <div class="spacerblock_20"></div>
    <div class="mainheader">
        <div class="pad20">
            <span class="headline11"><?php 
echo _('Web Form Url');
?>
</span>
        </div>
    </div>
    <div class="contentfull">
		<div class="messageshadow">
            <div class="messages">
            <?php 
$msg = new Message();
echo $msg->getMessage('web form url instruction');
?>
            </div>
        </div>
		<div><?php 
$_SESSION['do_userform']->setApplyRegistry(false);
echo _('The url for the web form ') . '<b>' . $_SESSION['do_userform']->title . '</b>' . _(' is ') . $GLOBALS['cfg_ofuz_site_http_base'] . 'form/' . $_SESSION['do_userform']->getPrimaryKeyValue();
?>
		</div>
		<?php 
echo _('Embed code to insert in your blog or web site');
?>
		<div>
		<textarea rows="2" cols="100"><script type="text/javascript" src="<?php 
echo $GLOBALS['cfg_ofuz_site_http_base'] . 'js_form.php?fid=' . $_SESSION['do_userform']->getPrimaryKeyValue();
?>
Ejemplo n.º 23
0
        <div class="settingsbottom"></div></div>
    </td><td class="layout_rcolumn">
        <div class="banner60 pad020 text32"><?php 
echo _('Settings');
?>
</div>
        <div class="banner50 pad020 text16 fuscia_text"><?php 
echo _('Export');
?>
</div>
        <div class="contentfull">
        <?php 
echo '<div class="messageshadow">';
echo '<div class="messages">';
$msg = new Message();
echo $msg->getMessage('export');
echo '</div></div>';
echo '<br />';
?>
		<div>
			<?php 
$e_export_contacts = new Event("Export->eventExportContacts");
$e_export_contacts->addParam("goto", $_SERVER['PHP_SELF']);
echo $e_export_contacts->getLink(_('Export My Contacts'));
?>
		</div>
        </div>
        <div class="solidline"></div>
    </td></tr></table>
    <div class="spacerblock_40"></div>
    <div class="layout_footer"></div>
Ejemplo n.º 24
0
<?php

require_once 'runtime.php';
require_once 'lib/core/register.class.php';
require_once 'lib/core/ConfigLine.class.php';
$smarty->assign('enable_network_policy', ConfigLine::configByName('enable_network_policy'));
$smarty->assign('network_policy_url', ConfigLine::configByName('network_policy_url'));
if (empty($_POST)) {
    $smarty->assign('message', Message::getMessage());
    $smarty->display("header.tpl.html");
    $smarty->display("register.tpl.html");
    $smarty->display("footer.tpl.html");
} else {
    //check weather the users wants to register with his openid
    if (isset($_GET['openid'])) {
        $_POST['password'] = Helper::randomPassword(8);
        $_POST['passwordchk'] = $_POST['password'];
    }
    if (Register::insertNewUser($_POST['nickname'], $_POST['password'], $_POST['passwordchk'], $_POST['email'], $_POST['agb'], $_POST['openid'])) {
        header('Location: ./login.php');
    } else {
        if (isset($_GET['openid'])) {
            header("Location: ./register.php?openid={$_GET['openid']}");
        } else {
            header('Location: ./register.php');
        }
    }
}
<table class="layout_columns"><tr><td class="layout_lmargin"></td><td>
<div class="layout_content">
<?php 
$thistab = '';
include_once 'includes/ofuz_navtabs.php';
$do_breadcrumb = new Breadcrumb();
$do_breadcrumb->getBreadcrumbs();
?>
    <div class="grayline1"></div>
    <div class="spacerblock_20"></div>
    <?php 
if ($access === false) {
    $msg = new Message();
    echo '<div class="messageshadow_unauthorized">';
    echo '<div class="messages_unauthorized">';
    echo $msg->getMessage("unauthorized_autoresponder_emailtemplate_access");
    echo '<br /><a href="/settings_auto_responder.php">Go Back</a>';
    echo '</div></div><br /><br />';
    exit;
}
if ($_SESSION['in_page_message'] != '') {
    echo '<div style="margin-left:0px;">';
    echo '<div class="messages_unauthorized">';
    echo htmlentities($_SESSION['in_page_message']);
    $_SESSION['in_page_message'] = '';
    echo '</div></div><br /><br />';
}
?>
 
    <table class="layout_columns"><tr><td class="layout_lcolumn settingsbg">
        <div class="settingsbar"><div class="spacerblock_16"></div>
Ejemplo n.º 26
0
echo _('Welcome to the ') . $do_user->company . _(' portal');
?>
</span>
        </div>
    </div>
    <div class="contentfull">
	    <div class="vpad10">
            <?php 
$contact_message = new ContactMessage();
$personalized_message = $contact_message->getPersonalizedMessage($idcontact, $iduser_for_feed);
if ($personalized_message) {
    echo $contact_message->displayPersonalizedMessage($personalized_message);
} else {
    $msg = new Message();
    $msg->setData(array("user_firstname" => $do_user->firstname, "user_lastname" => $do_user->lastname, "user_company" => $do_user->company));
    $msg->getMessage("welcome client portal");
    $msg->setCanClose("no");
    echo $msg->displayMessage();
}
?>
	    </div>
        <div class="grayline2"></div>
        <div class="headline_fuscia"><?php 
echo _('Add a Note or File');
?>
</div>
        <div class="percent95">
        <?php 
$ContactNotes = new ContactNotes($GLOBALS['conx']);
$ContactNotes->sessionPersistent("ContactNoteEditSave", "contacts.php", 300);
$_SESSION['ContactNoteEditSave']->idcontact = $idcontact;
session_start();
function relocate($url)
{
    header('location: ' . $url);
}
function my_autoloader($class)
{
    include 'classes/' . $class . '.php';
}
spl_autoload_register('my_autoloader');
define('BASE_URL', 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']);
define('HOST', dirname(BASE_URL) . '/');
$message = false;
if (Message::hasMessage()) {
    $message = Message::getMessage();
    Message::remove();
}
$db = new PDO('mysql:host=localhost;dbname=oplossing_file_upload', 'root', '');
// Connectie maken
$databaseWrapper = new Database($db);
$user = new User($databaseWrapper);
if (!$user->validate()) {
    new Message("U moet eerst inloggen", "error");
    relocate("oplossing-file-upload-login-form.php");
}
if (isset($_POST['activate'])) {
    $artikel = new Artikel($databaseWrapper);
    $id = $_POST['activate'];
    var_dump($_POST);
    $artikel->toggle($id);
Ejemplo n.º 28
0
$do_breadcrumb->getBreadcrumbs();
?>
<div class="grayline1"></div>
<div class="spacerblock_20"></div>
<table class="layout_columns"><tr><td class="layout_lcolumn">
<?php 
include_once 'plugin_block.php';
?>

</td><td class="layout_rcolumn">
<?php 
if ($_SESSION['in_page_message'] != '') {
    $msg = new Message();
    if ($_SESSION['in_page_message'] == "cw_already-have-pending-invitation-to") {
        $msg->setData(array("enc_email" => $_SESSION['in_page_message_data']['enc_email']));
        $msg->getMessage($_SESSION['in_page_message']);
        $msg->displayMessage();
    } else {
        $msg->getMessage($_SESSION['in_page_message']);
        $msg->displayMessage();
    }
    $_SESSION['in_page_message'] = '';
}
?>
<table class="mainheader pad20" width="100%">
<tr>
<td><span class="headline14">Co-Workers</span>
<td align="right">&nbsp;&nbsp;&nbsp;&nbsp;
<!--<a href="teams.php"><?php 
echo _('Teams');
?>
Ejemplo n.º 29
0
//$do_feedback = new Feedback(); $do_feedback->createFeedbackBox();
?>
<table class="layout_columns"><tr><td class="layout_lmargin"></td><td>
<div class="layout_content">
<?php 
include_once 'includes/ofuz_navtabs_invoice.php';
//$do_breadcrumb = new Breadcrumb(); $do_breadcrumb->getBreadcrumbs();
?>
    <div class="grayline1"></div>
    <div class="spacerblock_20"></div>
    <?php 
if (!$invoice_access) {
    $msg = new Message();
    echo '<div class="messageshadow_unauthorized">';
    echo '<div class="messages_unauthorized">';
    echo $msg->getMessage("wrong_invoice_url");
    echo '</div></div><br /><br />';
    exit;
}
?>
    <table class="layout_columns"><tr><td class="layout_lcolumn">
    <!--<div class="left_menu_header">
            <div class="left_menu_header_content"><?php 
echo _('Invoice');
?>
</div>
        </div>
        <div class="left_menu">
            <div class="left_menu_content">
            <a href="#">Pay By Paypal</a> <br />
            <a href="#">Pay By Authorized.Net</a> <br />
Ejemplo n.º 30
0
 public function testPutValidMessage()
 {
     //create a new message
     $newMessage = new Message(null, $this->VALID_MESSAGE_ID, $this->VALID_LISTING_Id, $this->VALID_ORG_ID, $this->VALID_MESSAGE_ID, $this->VALID_MESSAGE_TEXT);
     $newMessage->insert($this->getPDO());
     //run a get request to establish session tokens
     $this->guzzle->get('http://bootcamp-coders.cnm.edu/~bread-basket/public_html/php/api/message/');
     //grab the data from guzzle and enforce the status match our expectations
     $response = $this->guzzle->put('http://bootcamp-coders.cnm.edu/~bread-basket/public_html/php/api/message/' . $newMessage->getMessage(), ['headers' => ['X-XRF-TOKEN' => $this->getXsrfToken()], 'json' => $newMessage]);
     $this->assertSame($response->getStatusCode(), 200);
     $body = $response->getBpdy();
     $alertLevel = json_decode($body);
     $this->assertSame(200, $alertLevel->status);
 }