private function fatalError($errorMsg) { header("X-Kaltura: error-6"); header("X-Kaltura-App: exiting on error 6 - requested flavor was not found"); header("X-Kaltura-Error: " . htmlspecialchar($errorMsg)); // Then redirect to no-sources video: $this->sources = $this->getErrorVideoSources(); $flavorUrl = $this->getSourceForUserAgent(); header("location: " . $flavorUrl); exit(1); }
/** * Getter, will attempt to call $this->__get_<property>() * * @access public * @param string Property name * @return mixed Property value */ public function __get($property_name) { $method_name = '__get_' . $property_name; if (method_exists($this, $method_name)) { return $this->{$method_name}(); } if (!property_exists($this, $property_name)) { throw new exception('Trying to get non-existing property ' . htmlspecialchar(get_class($this)) . '->' . htmlspecialchar($property_name)); } return $this->{$property_name}; }
public function getContent() { $alt = trim($this->wikiContentArr[0]); // gestion du paramètre unique if ($this->separatorCount == 0) { $src = $alt; } else { $src = $this->wikiContentArr[1]; } $processedLink = $this->config->processLink($src, $this->name); $src = $processedLink[0]; $alt = $alt === $src ? '' : "<textobject><phrase>{$alt}</phrase></textobject>"; // on retourne le lien généré return "<img src=\"{$src}\" alt=\"{$alt}\" />"; return '<inlinemediaobject><imageobject><imagedata fileref="' . htmlspecialchar($src) . '/></imageobject>' . $alt . '</inlinemediaobject>'; }
" class="btn btn-info">Comments</a> <table> <thead> <tr> <td>Post Title</td> <td>Post Content</td> <td>Actions</td> </tr> </thead> <tbody> <?php foreach ($posts as $post) { ?> <tr> <td><h3><?php echo !empty($post['title']) ? htmlspecialchar($post['title']) : 'Post #' . htmlspecialchar($post['id']); ?> </h3></td> <td><p><?php echo implode(' ', array_slice(explode(' ', strip_tags($post['content'])), 0, 10)); ?> [...]</p></td> <td><a href="<?php echo $this->base->url . "/posts.php?id=" . $post['id'] . "&action=edit"; ?> " class="btn btn-primary">Edit Post</a><a href="<?php echo $this->base->url . "/posts.php?id=" . $post['id'] . "&action=delete"; ?> " class="btn btn-primary">Delete Post</a></td> </tr> <?php
" class="btn btn-info">Create Post</a> <table> <thead> <tr> <td>Post Title</td> <td>Post Content</td> <td>Actions</td> </tr> </thead> <tbody> <?php foreach ($posts as $post) { ?> <tr> <td><h3>Post #<?php echo htmlspecialchar($post['id']); ?> </h3></td> <td><p><?php echo implode(' ', array_slice(explode(' ', strip_tags($post['content'])), 0, 10)); ?> [...]</p></td> <td><a href="<?php echo $this->base->url . "/posts.php?id=" . $post['id'] . "&action=edit"; ?> " class="btn btn-primary">Edit Post</a><a href="<?php echo $this->base->url . "/?id=" . $post['id'] . "&action=delete"; ?> " class="btn btn-primary">Delete Post</a></td> </tr> <?php
$showFields = array('pw1', 'pw2'); $formGen->fieldsToShow($showFields); $userValues = $store->findAndGetUser('mail', $email); $hidden = array('emailconfirmed' => $email, 'token' => $token); $formGen->addHiddenData($hidden); $formGen->setSubmitter('submit_change'); $formHtml = $formGen->genFormHtml(); $html = new SimpleSAML_XHTML_Template($config, 'selfregister:lostPassword_changePassword.tpl.php', 'selfregister:selfregister'); $html->data['formHtml'] = $formHtml; $html->data['uid'] = $userValues[$store->userIdAttr]; $html->show(); } catch (sspmod_selfregister_Error_UserException $e) { // Invalid token $terr = new SimpleSAML_XHTML_Template($config, 'selfregister:lostPassword_email.tpl.php', 'selfregister:selfregister'); $error = $terr->t($e->getMesgId(), $e->getTrVars()); $terr->data['error'] = htmlspecialchar($error); $terr->show(); } } elseif (array_key_exists('sender', $_POST)) { try { // Add or update user object $listValidate = array('pw1', 'pw2'); $validator = new sspmod_selfregister_Registration_Validation($formFields, $listValidate); $email = filter_input(INPUT_POST, 'emailconfirmed', FILTER_VALIDATE_EMAIL); if (!$email) { throw new SimpleSAML_Error_Exception('E-mail parameter in request is lost'); } $tg = new SimpleSAML_Auth_TimeLimitedToken($tokenLifetime); $tg->addVerificationData($email); $token = $_REQUEST['token']; if (!$tg->validate_token($token)) {
<?php require_once 'includes/temps/header.php'; ?> <br/> <a href="<?php echo $this->base->url; ?> " class="btn btn-primary">Return to Post List</a> <?php foreach ($posts as $post) { ?> <h3>Post #<?php echo htmlspecialchar($post['id']); ?> </h3> <?php echo htmlspecialchar($post['content']); ?> <hr/> <?php } ?> <?php require_once 'includes/temps/footer.php';
</tr> </thead> <tbody> <?php foreach ($comments as $comment) { ?> <tr> <td><h4><?php echo htmlspecialchar($comment['name']); ?> </h4></td> <td><p><?php echo htmlspecialchar($comment['email']); ?> </p></td> <td><p><?php echo htmlspecialchar($comment['comment']); ?> </p></td> <td><a href="<?php echo $this->base->url . "/comments.php?id=" . $comment['id'] . "&action=delete"; ?> " class="btn btn-primary">Delete Comment</a></td> </tr> <?php } ?> </tbody> </table> <?php require_once '_inc/footer.php';
require_once 'includes/temps/header.php'; ?> <br/> <?php if (!empty($error)) { ?> <div class="alert alert-error">~<?php echo $error; ?> </div> <?php } ?> <br/> <form action="<?php echo htmlspecialchar($_SERVER['PHP_SELF']); ?> " method="post" class="form-horizontal offset2"> <h3>Admin Login</h3> <div class="control-group <?php echo !empty($error) ? 'error' : ''; ?> "> <label class="control-label" for="inputEmail">Username</label> <div class="controls"> <input type="text" name="username" id="inputEmail" placeholder="Username"> </div> </div> <div class="control-group <?php echo !empty($error) ? 'error' : ''; ?>