Esempio n. 1
0
 /**
  * Generates the RSS XML
  * @author Paul Heaney
  * @return string The XML string for the feed
  */
 function generate_feed_xml()
 {
     global $CONFIG, $application_version_string;
     if (!empty($_SESSION['lang'])) {
         $lang = $_SESSION['lang'];
     } else {
         $lang = $CONFIG['default_i18n'];
     }
     $xml = "<rss version=\"2.0\" xmlns:atom=\"http://www.w3.org/2005/Atom\">";
     $xml .= "<channel><title>{$this->title}</title>\n";
     $xml .= "<link>" . application_url() . "</link>\n";
     $xml .= "<atom:link href=\"{$this->feedurl}\" rel=\"self\" type=\"application/rss+xml\" />\n";
     $xml .= "<description>{$this->description}</description>\n";
     $xml .= "<language>{$lang}</language>\n";
     $xml .= "<pubDate>" . date('r', $this->pubdate) . "</pubDate>\n";
     $xml .= "<lastBuildDate>" . date('r', $this->pubdate) . "</lastBuildDate>\n";
     $xml .= "<docs>http://blogs.law.harvard.edu/tech/rss</docs>";
     $xml .= "<generator>{$CONFIG['application_name']} {$application_version_string}</generator>\n";
     $xml .= "<webMaster>" . user_email($CONFIG['support_manager']) . " (Support Manager)</webMaster>\n";
     if (is_array($this->items)) {
         foreach ($this->items as $item) {
             $xml .= $item->generateItem();
         }
     }
     $xml .= "</channel></rss>\n";
     return $xml;
 }
Esempio n. 2
0
function redirect($URL, $absolute = FALSE)
{
    $fullURL = $absolute ? $URL : application_url($URL);
    if (!headers_sent()) {
        header("Location: {$fullURL}");
    }
    echo "<META HTTP-EQUIV=\"Refresh\" CONTENT=\"0;url={$fullURL}\">";
    echo "<br><br><a href=\"{$fullURL}\">Click here</a> if you aren't automatically redirected.";
    exit;
}
				<div class="alert alert-danger">
					<?php 
            echo $Translation['password reset invalid'];
            ?>
				</div>
				<?php 
            include_once "{$currDir}/footer.php";
            exit;
        }
        // generate and store password reset key, if no valid key already exists
        $no_valid_key = $row['pass_reset_key'] == '' || $row['pass_reset_key'] != '' && $row['pass_reset_expiry'] < time() - $reset_expiry;
        $key = $no_valid_key ? md5(microtime()) : $row['pass_reset_key'];
        $expiry = $no_valid_key ? time() + $reset_expiry : $row['pass_reset_expiry'];
        @db_query("update membership_users set pass_reset_key='{$key}', pass_reset_expiry='{$expiry}' where memberID='" . addslashes($row['memberID']) . "'");
        // determine password reset URL
        $ResetLink = application_url("membership_passwordReset.php?key={$key}");
        // send reset instructions
        @mail($row['email'], $Translation['password reset subject'], str_replace('<ResetLink>', $ResetLink, $Translation['password reset message']), "From: " . $adminConfig['senderName'] . " <" . $adminConfig['senderEmail'] . ">");
        // display confirmation
        ?>
			<div class="row">
				<div class="col-md-6 col-md-offset-3">
					<div class="alert alert-info">
						<i class="glyphicon glyphicon-info-sign" style="font-size: xx-large; float: left; margin: 0 10px;"></i>
						<?php 
        echo $Translation['password reset ready'];
        ?>
					</div>
				</div>
			</div>
			<?php 
Esempio n. 4
0
    //Store that application is installed
    $sample_config_file = "application/config/sample-config.php";
    $config_file = "application/config/config.php";
    rename($sample_config_file, $config_file);
    $line_array = file($config_file);
    for ($i = 0; $i < count($line_array); $i++) {
        if (strstr($line_array[$i], "['install']")) {
            $line_array[$i] = '$config[\'install\'] = 1;' . "\r\n";
        }
    }
    file_put_contents($config_file, $line_array);
    ?>
			<div class="form_style">
				<div class="alert alert-success"> Use Username / Password : admin/admin to login </div>
				<a class="btn btn-success square-btn-adjust" title="Goto Application" href="<?php 
    echo application_url() . "index.php/login/cleardata";
    ?>
">Continue to Application</a>
			</div>
            <?php 
}
?>
	
		<!-- SCRIPTS -AT THE BOTOM TO REDUCE THE LOAD TIME-->
		<!-- JQUERY SCRIPTS -->
		<script src="assets/js/jquery-1.10.2.js"></script>
		  <!-- BOOTSTRAP SCRIPTS -->
		<script src="assets/js/bootstrap.min.js"></script>
		<!-- METISMENU SCRIPTS -->
		<script src="assets/js/jquery.metisMenu.js"></script>
		  <!-- CUSTOM SCRIPTS -->