Skip to content
Snippets Groups Projects
Commit aebdc54c authored by Imran Hussain's avatar Imran Hussain
Browse files

Copy over some files that didn't get merged properly

parent e139a8ba
No related branches found
No related tags found
No related merge requests found
<?php
function listdir($mypath, $recurse, $summaries) {
global $DB;
global $DB, $base;
$dirlist = @scandir(SUCS_BASEDIR."static".$mypath);
$dirlist = @scandir($base."static".$mypath);
$output = array();
if (is_array($dirlist)) foreach($dirlist as $file) {
// Hide files starting with a .
if ($file[0]!=".") {
$element = array();
if (!is_dir(SUCS_BASEDIR."static".$mypath."/".$file)) {
if (!is_dir($base."static".$mypath."/".$file)) {
$pagename = preg_replace("/\.txt/", "", $file);
if ($summaries) $element['summary'] = $DB->GetOne("select summary from static where path=?", array($mypath."/".$pagename));
if ($pagename!=@$lastdir) $output[$pagename]=str_replace("_", " ", $element);
......@@ -36,7 +36,7 @@ if ($path==$component['path']) {
include("static.php");
if ($title!="File not found") {
if (!is_dir(SUCS_BASEDIR."static".$path)) {
if (!is_dir($base."static".$path)) {
$pos = strrpos($path, "/");
$path = substr($path, 0, $pos);
}
......
......@@ -113,7 +113,7 @@ if (isset($_REQUEST['search']) && (trim($_REQUEST['search']) != "")) {
// someone wants to check out this book
$msgbody = "User {$session->username} would like to take out";
$msgbody .= " {$book['title']} by {$book['author']} from the library.\n\n";
$msgbody .= "Visit https://".SUCS_PREFERRED_HOSTNAME."$path to process this request.";
$msgbody .= "Visit https://$preferred_hostname$path to process this request.";
mail($librarian_mail, "Book Request", $msgbody);
$smarty->assign("checkout_request", true);
......
......@@ -176,7 +176,7 @@ if (isset($pathlist[3])) {
$sub = fetch_sub($all, $all[$artno]['ref']);
$smarty->assign_by_ref("articles", $sub);
$smarty->assign("howmany",count($sub));
$output = $smarty->fetch(SUCS_BASEDIR."templates/mw-article.tpl");
$output = $smarty->fetch($base."templates/mw-article.tpl");
}
} else {
......@@ -200,7 +200,7 @@ if (isset($pathlist[3])) {
$smarty->assign("title", htmlentities("Milliways - Folder $name"));
$smarty->assign_by_ref("articles", $top);
$output = $smarty->fetch(SUCS_BASEDIR."templates/mw-list.tpl");
$output = $smarty->fetch($base."templates/mw-list.tpl");
}
} else {
$output = "Error, no such folder $name";
......@@ -218,7 +218,7 @@ if (isset($pathlist[3])) {
$folders[$k]['lastpost'] = $lastone['date'];
}
$smarty->assign("title", "Milliways - Topic List");
$output = $smarty->fetch(SUCS_BASEDIR."templates/mw-folders.tpl");
$output = $smarty->fetch($base."templates/mw-folders.tpl");
$smarty->assign("body", $output);
}
......
......@@ -16,7 +16,7 @@ if (isset($session->groups[$permission])) {
$res = $DB->GetAll("SELECT * FROM pagemap where id=?", array($id));
if ($res && count($res) > 0) {
$smarty->assign("oldmap",$res[0]);
$output = $smarty->fetch(SUCS_BASEDIR."templates/pagemap_edit.tpl");
$output = $smarty->fetch($base."templates/pagemap_edit.tpl");
} else {
header("Location: /Admin/Pagemap");
exit;
......@@ -31,7 +31,7 @@ if (isset($session->groups[$permission])) {
if (!isset($output)) {
$smarty->assign("map",$DB->GetAll("SELECT * FROM pagemap ORDER BY depth, path"));
$output = $smarty->fetch(SUCS_BASEDIR."templates/pagemap.tpl");
$output = $smarty->fetch($base."templates/pagemap.tpl");
}
$smarty->assign("title", "Page Map");
$smarty->assign("body", $output);
......
......@@ -238,7 +238,7 @@ if(!empty($pblang) && $pblang != 'NONE') {
$smarty->assign('pasteLanguages', $LANGUAGES);
// Load templates etc
$smarty->assign("extra_styles", array(SUCS_BASEURL"/css/pastebin.css"));
$smarty->assign("extra_styles", array("$baseurl/css/pastebin.css"));
$result = $smarty->fetch('pastebin.tpl');
$sidebar = $smarty->fetch('pastebin-sidebar.tpl');
$smarty->assign('title', 'PasteBin');
......
......@@ -5,11 +5,11 @@
$permission = "html";
// Get the right filename...
$myfile = SUCS_BASEDIR."static".$path.$language['file'].".txt";
$secondaryfile = SUCS_BASEDIR."static".$path.$language['file']."-secondary.txt";
$myfile = $base."static".$path.$language['file'].".txt";
$secondaryfile = $base."static".$path.$language['file']."-secondary.txt";
if (!file_exists($myfile)) {
$myfile = SUCS_BASEDIR."static$path.txt";
$secondaryfile = SUCS_BASEDIR."static$path-secondary.txt";
$myfile = $base."static$path.txt";
$secondaryfile = $base."static$path-secondary.txt";
// If the file doesn't exist...
if (!file_exists($myfile)) {
if (isset($session->groups[$permission]) && @$_REQUEST['action']=="create") {
......@@ -31,7 +31,7 @@ if (!file_exists($myfile)) {
} else {
// ...serve a 404 error
header("HTTP/1.1 404 Not Found");
$body = @file_get_contents(SUCS_BASEDIR."static/404.txt");
$body = @file_get_contents($base."static/404.txt");
$smarty->assign("pathlist", array("", "Error"));
$title = "File not found";
$smarty->assign("title", $title);
......
Source diff could not be displayed: it is too large. Options to address this: view the blob.
../../components/disk.graph/index.php
\ No newline at end of file
../../htdocs/planet/Planet.txt
\ No newline at end of file
......@@ -3,9 +3,8 @@
<ul>
{/if}
{foreach name=contents from=$data key=name item=item}
{if $level == 0}<h3>{else}<li>{/if}<a href="{$rootnode}{$parent}/{$name|encodestring}">{$name}</a>{if $level == 0}</h3>
{if $level == 0}<h3>{else}<li>{/if}<a href="{$rootnode}{$parent}/{$name}">{$name}</a>{if $level == 0}</h3>
{/if}{if $item.summary}{if $level > 0} - {/if}{$item.summary}{/if}{if is_array($item.file)}
{assign var='name' value=$name|encodestring}
{include file="contents-loop.tpl" data=$item.file parent="$parent/$name" level=$level}
{/if}
{if $level > 0}</li>{/if}
......
......@@ -13,7 +13,9 @@
<div class="cornerBottomLeft">
<div class="cornerBottomRight">
<p>{$smarty.const.SUCS_FOOTERMSG_cy}</p>
<p>
Cynnalwyd y safle hwn a cynllunwyd gan CGPA. Mae personau perthnasol sy biau y barnau rhain nid y gymdeithas.
</p>
</div>
</div>
</div>
......
......@@ -22,7 +22,7 @@
<div id="footer">
<div class="cornerBottomLeft">
<div class="cornerBottomRight">
<p>{$smarty.const.SUCS_FOOTERMSG}</p>
<p>Site designed and maintained by SUCS. All opinions expressed are those of the relevant individual and not of the society.</p>
{if isset($totaltime)}<p>Script executed in {$totaltime} seconds</p>{/if}
</div>
</div>
......
......@@ -8,8 +8,7 @@
{foreach name=news from=$news key=itemnum item=item}
<h3>{$item.title}</h3>
<div>
{articlesummary article=$item.body}
<span style="float: right"><a href="/News/{$item.title|encodestring}">Read More</a></span>
{articlesummary id=$item.id article=$item.body title=$item.title}
</div>
{/foreach}
<div class="clear"></div>
......
<h2>{if $action == 'edit'}Edit{else}Post{/if} a news item</h2>
<h2>Post a news item</h2>
<form class="admin" action="{$baseurl}{$path}" method="POST">
<div class="row">
......
......@@ -15,7 +15,7 @@
{/if}
{if $session->loggedin}
<form action="{$smarty.const.SUCS_BASEURL}{$path}" method="post">
<form action="{$baseurl}{$path}" method="post">
<div class="box">
<div class="boxhead"><h2>Paste an item</h2></div>
<div class="boxcontent">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment