Browse Source

Replaced all subdirectory specific url generation with page specific

tags/v1.1^2
Teknikode 5 years ago
parent
commit
1d9bc1ad22

+ 22
- 22
about/main.php View File

@@ -46,32 +46,32 @@
Teknik was created to provide our users free services that they can trust. All of our services are treated with the utmost care to provide you with the best experience possible, and the best security with your data that we can give.
</p>
<p>
You can view our complete activity and statistics by visiting the <a href="<?php echo get_subdomain_full_url("transparency", $CONF); ?>" target="_blank">Transparency</a> page.
You can view our complete activity and statistics by visiting the <a href="<?php echo get_page_url("transparency", $CONF); ?>" target="_blank">Transparency</a> page.
</p>
<h2 class="text-center">What we Offer</h2>
<hr>
<div class="row">
<div class="col-sm-4 col-sm-offset-2 text-center">
<h4><a href="<?php echo get_subdomain_full_url("paste", $CONF); ?>" target="_blank">Fast and Secure Pastebin</a></h4>
<h4><a href="<?php echo get_subdomain_full_url("upload", $CONF); ?>" target="_blank">Encrypted File Uploads</a></h4>
<h4><a href="<?php echo get_subdomain_full_url("mail", $CONF); ?>" target="_blank">Free Email Address</a></h4>
<h4><a href="<?php echo get_subdomain_full_url("api", $CONF); ?>" target="_blank">Easy to Use API</a></h4>
<h4><a href="<?php echo get_page_url("paste", $CONF); ?>" target="_blank">Fast and Secure Pastebin</a></h4>
<h4><a href="<?php echo get_page_url("upload", $CONF); ?>" target="_blank">Encrypted File Uploads</a></h4>
<h4><a href="<?php echo get_page_url("mail", $CONF); ?>" target="_blank">Free Email Address</a></h4>
<h4><a href="<?php echo get_page_url("api", $CONF); ?>" target="_blank">Easy to Use API</a></h4>
</div>
<div class="col-sm-4 text-center">
<h4><a href="<?php echo get_subdomain_full_url("blog", $CONF); if ($logged_in) { echo "/".$user->username; }?>" target="_blank">Personal Blog</a></h4>
<h4><a href="<?php echo get_subdomain_full_url("podcast", $CONF); ?>" target="_blank">Entertaining Podcasts</a></h4>
<h4><a href="<?php echo get_subdomain_full_url("help", $CONF); ?>#mumble" target="_blank">Mumble Server</a></h4>
<h4><a href="<?php echo get_subdomain_full_url("transparency", $CONF); ?>" target="_blank">Full Transparency</a></h4>
<h4><a href="<?php echo get_page_url("blog", $CONF); if ($logged_in) { echo "/".$user->username; }?>" target="_blank">Personal Blog</a></h4>
<h4><a href="<?php echo get_page_url("podcast", $CONF); ?>" target="_blank">Entertaining Podcasts</a></h4>
<h4><a href="<?php echo get_page_url("help", $CONF); ?>#mumble" target="_blank">Mumble Server</a></h4>
<h4><a href="<?php echo get_page_url("transparency", $CONF); ?>" target="_blank">Full Transparency</a></h4>
</div>
</div>
<h2 class="text-center">How can I help?</h2>
<hr>
<p>
Teknik hosts an open <a href="<?php echo get_subdomain_full_url("git", $CONF); ?>">Git Repository</a> for all our internal tools projects. This is open to all registered users so feel free to add to it!
Teknik hosts an open <a href="<?php echo get_page_url("git", $CONF); ?>">Git Repository</a> for all our internal tools projects. This is open to all registered users so feel free to add to it!
<br />
<br />
Have a cool suggestion for the site? Just submit it using the <a href="<?php echo get_subdomain_full_url("contact", $CONF); ?>">Feedback Form</a>!
Have a cool suggestion for the site? Just submit it using the <a href="<?php echo get_page_url("contact", $CONF); ?>">Feedback Form</a>!
</p>
<div class="alert alert-info">
<div class="text-center">
@@ -91,10 +91,10 @@
qrcode : false,
auto_show : false,
decimals : 6,
imgSource : '<?php echo get_subdomain_full_url("cdn", $CONF); ?>/<?php echo $CONF['template']; ?>/img/',
cssSource : '<?php echo get_subdomain_full_url("cdn", $CONF); ?>/<?php echo $CONF['template']; ?>/css/',
jsSource : '<?php echo get_subdomain_full_url("cdn", $CONF); ?>/<?php echo $CONF['template']; ?>/js/coin/',
phpSource : '<?php echo get_subdomain_full_url($CONF['sub'], $CONF); ?>/includes/'
imgSource : '<?php echo get_page_url("cdn", $CONF); ?>/<?php echo $CONF['template']; ?>/img/',
cssSource : '<?php echo get_page_url("cdn", $CONF); ?>/<?php echo $CONF['template']; ?>/css/',
jsSource : '<?php echo get_page_url("cdn", $CONF); ?>/<?php echo $CONF['template']; ?>/js/coin/',
phpSource : '<?php echo get_page_url($CONF['sub'], $CONF); ?>/includes/'
});
</script>
<script>
@@ -110,10 +110,10 @@
qrcode : false,
auto_show : false,
decimals : 6,
imgSource : '<?php echo get_subdomain_full_url("cdn", $CONF); ?>/<?php echo $CONF['template']; ?>/img/',
cssSource : '<?php echo get_subdomain_full_url("cdn", $CONF); ?>/<?php echo $CONF['template']; ?>/css/',
jsSource : '<?php echo get_subdomain_full_url("cdn", $CONF); ?>/<?php echo $CONF['template']; ?>/js/coin/',
phpSource : '<?php echo get_subdomain_full_url($CONF['sub'], $CONF); ?>/includes/'
imgSource : '<?php echo get_page_url("cdn", $CONF); ?>/<?php echo $CONF['template']; ?>/img/',
cssSource : '<?php echo get_page_url("cdn", $CONF); ?>/<?php echo $CONF['template']; ?>/css/',
jsSource : '<?php echo get_page_url("cdn", $CONF); ?>/<?php echo $CONF['template']; ?>/js/coin/',
phpSource : '<?php echo get_page_url($CONF['sub'], $CONF); ?>/includes/'
});
</script>
</div>
@@ -176,7 +176,7 @@
?>
<div class="col-md-6">
<div class="blockquote-box blockquote-danger clearfix">
<a href="<?php echo get_subdomain_full_url("www", $CONF); ?>/<?php echo $founderuser->username; ?>">
<a href="<?php echo get_page_url("home", $CONF); ?>/<?php echo $founderuser->username; ?>">
<div class="square pull-left">
<span class="glyphicon glyphicon-tower glyphicon-lg"></span>
</div>
@@ -210,7 +210,7 @@
?>
<div class="col-md-6">
<div class="blockquote-box blockquote-primary clearfix">
<a href="<?php echo get_subdomain_full_url("www", $CONF); ?>/<?php echo $adminuser->username; ?>">
<a href="<?php echo get_page_url("home", $CONF); ?>/<?php echo $adminuser->username; ?>">
<div class="square pull-left">
<span class="glyphicon glyphicon-star glyphicon-lg"></span>
</div>
@@ -244,7 +244,7 @@
?>
<div class="col-md-6">
<div class="blockquote-box blockquote-success clearfix">
<a href="<?php echo get_subdomain_full_url("www", $CONF); ?>/<?php echo $moduser->username; ?>">
<a href="<?php echo get_page_url("home", $CONF); ?>/<?php echo $moduser->username; ?>">
<div class="square pull-left">
<span class="glyphicon glyphicon-star-empty glyphicon-lg"></span>
</div>

+ 2
- 2
admin/index.php View File

@@ -19,11 +19,11 @@ if ($logged_in)
}
else
{
header('Location: '.get_subdomain_full_url('error', $CONF).'/403');
header('Location: '.get_page_url('error', $CONF).'/403');
}
}
else
{
header('Location: '.get_subdomain_full_url('error', $CONF).'/403');
header('Location: '.get_page_url('error', $CONF).'/403');
}
?>

+ 5
- 5
api/api.php View File

@@ -63,7 +63,7 @@ if (isset($_GET['component']))
array('paste' =>
array(
'id' => $id,
'url' => get_subdomain_full_url("p", $CONF).'/'.$id,
'url' => get_page_url("p", $CONF).'/'.$id,
'title' => $post['title'],
'format' => $post['format'],
'expiration' => $post['expires'],
@@ -131,8 +131,8 @@ if (isset($_GET['component']))
array_push($jsonArray, array('image' =>
array(
'id' => $row_id,
'url' => get_subdomain_full_url("ricehalla", $CONF).'/'.$row_id,
'image_src' => get_subdomain_full_url("u", $CONF).'/'.$filename,
'url' => get_page_url("ricehalla", $CONF).'/'.$row_id,
'image_src' => get_page_url("u", $CONF).'/'.$filename,
'votes' => 1,
'owner' => $user->username,
'date_posted' => $date_added,
@@ -245,8 +245,8 @@ if (isset($_GET['component']))
array_push($result_array, array('image' =>
array(
'id' => $id,
'url' => get_subdomain_full_url("ricehalla", $CONF).'/'.$id,
'image_src' => get_subdomain_full_url("u", $CONF).'/'.$image_src,
'url' => get_page_url("ricehalla", $CONF).'/'.$id,
'image_src' => get_page_url("u", $CONF).'/'.$image_src,
'votes' => $user_vote,
'owner' => $username,
'date_posted' => $date_posted,

+ 2
- 2
blog/get_post.php View File

@@ -60,9 +60,9 @@ if(isset($_POST))
<div class="row">
<div class="col-sm-10 col-sm-offset-1 blog-main">
<div class="blog-post">
<h2 class="blog-post-title text-center"><a href="<?php echo get_subdomain_full_url("blog", $CONF); ?>/<?php echo $author->username; ?>/<?php echo $post_id; ?>" id="title_<?php echo $post_id; ?>"><?php echo $title; ?></a></h2>
<h2 class="blog-post-title text-center"><a href="<?php echo get_page_url("blog", $CONF); ?>/<?php echo $author->username; ?>/<?php echo $post_id; ?>" id="title_<?php echo $post_id; ?>"><?php echo $title; ?></a></h2>
<p class="blog-post-meta text-center text-muted">
Posted on <?php echo date("F d, Y",strtotime($date)); ?> by <a href="<?php echo get_subdomain_full_url("www", $CONF); ?>/<?php echo $author->username; ?>"><?php echo $author->username; ?></a><?php echo $reply_msg; ?>
Posted on <?php echo date("F d, Y",strtotime($date)); ?> by <a href="<?php echo get_page_url("home", $CONF); ?>/<?php echo $author->username; ?>"><?php echo $author->username; ?></a><?php echo $reply_msg; ?>
<?php
if ($own_blog)
{

+ 1
- 1
blog/main.php View File

@@ -68,7 +68,7 @@ set_page_title($title_bar);
<div class="row">
<div class="col-sm-12 text-center">
<p>
<a href="<?php echo get_subdomain_full_url('rss', $CONF).'/blog/'.$blog_author; ?>"><i class="fa fa-rss fa-2x fa-border"></i></a>
<a href="<?php echo get_page_url('rss', $CONF).'/blog/'.$blog_author; ?>"><i class="fa fa-rss fa-2x fa-border"></i></a>
</p>
</div>
</div>

+ 2
- 2
blog/view_post.php View File

@@ -78,9 +78,9 @@ if (isset($_GET['post']))
<div class="row">
<div class="col-sm-10 col-sm-offset-1 blog-main">
<div class="blog-post">
<h2 class="blog-post-title text-center"><a href="<?php echo get_subdomain_full_url("blog", $CONF); ?>/<?php echo $author->username; ?>/<?php echo $post_id; ?>" id="title_<?php echo $post_id; ?>"><?php echo $title; ?></a></h2>
<h2 class="blog-post-title text-center"><a href="<?php echo get_page_url("blog", $CONF); ?>/<?php echo $author->username; ?>/<?php echo $post_id; ?>" id="title_<?php echo $post_id; ?>"><?php echo $title; ?></a></h2>
<p class="blog-post-meta text-center text-muted">
Posted on <?php echo date("F d, Y",strtotime($date)); ?> by <a href="<?php echo get_subdomain_full_url("www", $CONF); ?>/<?php echo $author->username; ?>"><?php echo $author->username; ?></a>
Posted on <?php echo date("F d, Y",strtotime($date)); ?> by <a href="<?php echo get_page_url("home", $CONF); ?>/<?php echo $author->username; ?>"><?php echo $author->username; ?></a>
<?php
if ($own_blog)
{

+ 2
- 2
errors/403.php View File

@@ -8,8 +8,8 @@
You aren't allowed to see this!
</div>
<div class="error-actions">
<a href="<?php echo get_subdomain_full_url("www", $CONF); ?>" class="btn btn-primary btn-lg"><span class="glyphicon glyphicon-home"></span>
Take Me Home </a><a href="<?php echo get_subdomain_full_url("contact", $CONF); ?>" class="btn btn-default btn-lg"><span class="glyphicon glyphicon-envelope"></span> Contact Support </a>
<a href="<?php echo get_page_url("home", $CONF); ?>" class="btn btn-primary btn-lg"><span class="glyphicon glyphicon-home"></span>
Take Me Home </a><a href="<?php echo get_page_url("contact", $CONF); ?>" class="btn btn-default btn-lg"><span class="glyphicon glyphicon-envelope"></span> Contact Support </a>
</div>
</div>
</div>

+ 2
- 2
errors/404.php View File

@@ -8,8 +8,8 @@
Sorry, an error has occured, Requested page not found!
</div>
<div class="error-actions">
<a href="<?php echo get_subdomain_full_url("www", $CONF); ?>" class="btn btn-primary btn-lg"><span class="glyphicon glyphicon-home"></span>
Take Me Home </a><a href="<?php echo get_subdomain_full_url("contact", $CONF); ?>" class="btn btn-default btn-lg"><span class="glyphicon glyphicon-envelope"></span> Contact Support </a>
<a href="<?php echo get_page_url("home", $CONF); ?>" class="btn btn-primary btn-lg"><span class="glyphicon glyphicon-home"></span>
Take Me Home </a><a href="<?php echo get_page_url("contact", $CONF); ?>" class="btn btn-default btn-lg"><span class="glyphicon glyphicon-envelope"></span> Contact Support </a>
</div>
</div>
</div>

+ 1
- 1
git/index.php View File

@@ -20,7 +20,7 @@ if(!preg_match($pattern, $url))

set_page_title("Teknik Git");
?>
<script src="<?php echo get_subdomain_full_url($CONF['sub'], $CONF); ?>/templates/<?php echo $CONF['template']; ?>/js/codemirror/codemirror.js"></script>
<script src="<?php echo get_page_url($CONF['sub'], $CONF); ?>/templates/<?php echo $CONF['template']; ?>/js/codemirror/codemirror.js"></script>
<?php
}


+ 3
- 3
help/main.php View File

@@ -6,11 +6,11 @@
<h3>Important Links</h3>
<dl class="dl-horizontal">
<dt><a href="<?php echo get_subdomain_full_url("transparency", $CONF); ?>" target="_blank">Site Transparency</a></dt>
<dt><a href="<?php echo get_page_url("transparency", $CONF); ?>" target="_blank">Site Transparency</a></dt>
<dd>All the site's transactions, statistics, and data effecting actions.</dd>
<dt><a href="<?php echo get_subdomain_full_url("privacy", $CONF); ?>" target="_blank">Privacy Policy</a></dt>
<dt><a href="<?php echo get_page_url("privacy", $CONF); ?>" target="_blank">Privacy Policy</a></dt>
<dd>Everything about how we handle your privacy.</dd>
<dt><a href="<?php echo get_subdomain_full_url("stats", $CONF); ?>" target="_blank">Server Statistics</a></dt>
<dt><a href="<?php echo get_page_url("stats", $CONF); ?>" target="_blank">Server Statistics</a></dt>
<dd>The current Server Hardware statistics that Teknik is running on.</dd>
</dl>
</div>

+ 2
- 2
home/profile.php View File

@@ -30,7 +30,7 @@ if (isset($_GET['id']))
<?php } ?>
<li class="list-group-item text-right"><span class="pull-left"><strong>Email</strong></span> <a href="mailto:<?php echo $Profile_User->username; ?>@teknik.io"><?php echo $Profile_User->username; ?>@teknik.io</a></li>
<?php if ($Profile_User->blog_title) { ?>
<li class="list-group-item text-right"><span class="pull-left"><strong>Blog</strong></span> <a href="<?php echo get_subdomain_full_url('blog', $CONF).'/'.$Profile_User->username; ?>" id="blog_title"><?php echo $Profile_User->blog_title; ?></a></li>
<li class="list-group-item text-right"><span class="pull-left"><strong>Blog</strong></span> <a href="<?php echo get_page_url('blog', $CONF).'/'.$Profile_User->username; ?>" id="blog_title"><?php echo $Profile_User->blog_title; ?></a></li>
<?php } ?>
<?php if ($own_profile) { ?>
<li class="list-group-item text-center"><button type="button" class="btn btn-danger" id="delete_account">Delete Account</button></li>
@@ -257,7 +257,7 @@ if (isset($_GET['id']))
}
else
{
redirect(get_subdomain_full_url("www", $CONF));
redirect(get_page_url("home", $CONF));
}
include('../templates/'.$CONF['template'].'/footer.php');
?>

+ 3
- 3
includes/common.php View File

@@ -9,7 +9,7 @@ function get_page_url($page, $CONF, $full = true)
{
$page = 'www';
}
$full_url = get_subdomain_full_url($page, $CONF);
$full_url = get_page_url($page, $CONF);
break;
case 'page':
$cur_sub = get_subdomain();
@@ -19,7 +19,7 @@ function get_page_url($page, $CONF, $full = true)
return $full_url;
}
function get_subdomain_full_url($sub_part, $CONF)
function get_page_url($sub_part, $CONF)
{
$url = get_http($CONF).$sub_part.".".$CONF['host'];
return $url;
@@ -201,7 +201,7 @@ function upload($files, $CONF, $db)
);
$db->insert($data, 'uploads');
$_SESSION[$targetFile] = $targetFile;
return array('results' => array('file' => array('name' => $targetFile, 'url' => get_subdomain_full_url("u", $CONF).'/'.$targetFile, 'type' => $file_type, 'size' => $filesize)));
return array('results' => array('file' => array('name' => $targetFile, 'url' => get_page_url("u", $CONF).'/'.$targetFile, 'type' => $file_type, 'size' => $filesize)));
}
return array('error' => $CONF['errors']['InvFile']);
}

+ 1
- 1
includes/get_comment.php View File

@@ -44,7 +44,7 @@ if(isset($_POST))
<div class="col-sm-8 col-sm-offset-2">
<div class="post-comment">
<p class="post-comment-meta text-muted">
<a href="<?php echo get_subdomain_full_url("www", $CONF); ?>/<?php echo $author->username; ?>"><?php echo $author->username; ?></a> replied at <?php echo date("g:i:s a",strtotime($date)); ?> on <?php echo date("F d, Y",strtotime($date)); ?>
<a href="<?php echo get_page_url("home", $CONF); ?>/<?php echo $author->username; ?>"><?php echo $author->username; ?></a> replied at <?php echo date("g:i:s a",strtotime($date)); ?> on <?php echo date("F d, Y",strtotime($date)); ?>
<?php
if ($own_comment && $logged_in)
{

+ 1
- 1
mail/help.php View File

@@ -6,7 +6,7 @@
<h3>Mail Server Settings</h3>
<p>
At registration, each user is given an email address with <b>1 GB</b> of storage space.
You can either access your email via the <a href="<?php echo get_subdomain_full_url("mail", $CONF); ?>" target="_blank">Web Client</a> or by using a client of your choosing with support for IMAP or POP3.
You can either access your email via the <a href="<?php echo get_page_url("mail", $CONF); ?>" target="_blank">Web Client</a> or by using a client of your choosing with support for IMAP or POP3.
</p>
<div class="row">
<div class="col-sm-5">

+ 3
- 3
paste/main.php View File

@@ -213,8 +213,8 @@ if (!(isset($pass) && (sha1($postPass) !== $pass)) || $pass == "EMPTY") {?>
<small class="pull-right"><?php echo $entry['agefmt'];?></small>
<p class="no-margin"><i class="icon-code"></i>
<?php if ( $mod_rewrite == true ) {
echo '<a href="'. get_subdomain_full_url('p', $CONF) . '/' . $entry['pid'] . '">' . $entry['title'] . '</a>'; } else {
echo '<a href="'. get_subdomain_full_url('p', $CONF) . '/' .'?paste='. $entry['pid'].'">' . $entry['title'] . '</a>'; } ?>
echo '<a href="'. get_page_url('p', $CONF) . '/' . $entry['pid'] . '">' . $entry['title'] . '</a>'; } else {
echo '<a href="'. get_page_url('p', $CONF) . '/' .'?paste='. $entry['pid'].'">' . $entry['title'] . '</a>'; } ?>
</p>
</div>
<?php } ?>
@@ -226,5 +226,5 @@ if (!(isset($pass) && (sha1($postPass) !== $pass)) || $pass == "EMPTY") {?>
<?php } ?>

<p class="text-center">
Tools: <a href="<?php echo get_subdomain_full_url('git', $CONF); ?>/Tools.git/blob/master/Paste/paste.sh">Bash Paste Script</a>
Tools: <a href="<?php echo get_page_url('git', $CONF); ?>/Tools.git/blob/master/Paste/paste.sh">Bash Paste Script</a>
</p>

+ 3
- 3
podcast/get_post.php View File

@@ -43,7 +43,7 @@ if(isset($_POST))
<div class="row">
<div class="col-sm-10 col-sm-offset-1 podcast-main">
<div class="podcast-post">
<h2 class="podcast-post-title text-center"><a href="<?php echo get_subdomain_full_url("podcast", $CONF); ?>/<?php echo $post_id; ?>" id="title_<?php echo $post_id; ?>"><?php echo $title; ?></a></h2>
<h2 class="podcast-post-title text-center"><a href="<?php echo get_page_url("podcast", $CONF); ?>/<?php echo $post_id; ?>" id="title_<?php echo $post_id; ?>"><?php echo $title; ?></a></h2>
<p class="podcast-post-meta text-center text-muted">
Posted on <?php echo date("F d, Y",strtotime($date)); ?><?php echo $reply_msg; ?>
<?php
@@ -62,7 +62,7 @@ if(isset($_POST))
<?php
foreach ($files as $filename)
{
$file_path = get_subdomain_full_url("podcast", $CONF).'/Podcasts/'.$title.'/'.$filename;
$file_path = get_page_url("podcast", $CONF).'/Podcasts/'.$title.'/'.$filename;
$direct_path = $CONF['podcast_dir'].$title.'/'.$filename;
if (file_exists($direct_path))
{
@@ -80,7 +80,7 @@ if(isset($_POST))
<?php
foreach ($files as $filename)
{
$file_path = get_subdomain_full_url("podcast", $CONF).'/Podcasts/'.$title.'/'.$filename;
$file_path = get_page_url("podcast", $CONF).'/Podcasts/'.$title.'/'.$filename;
$direct_path = $CONF['podcast_dir'].$title.'/'.$filename;
if (file_exists($direct_path))
{

+ 1
- 1
podcast/main.php View File

@@ -22,7 +22,7 @@ set_page_title($podcast_title);
<div class="row">
<div class="col-sm-12 text-center">
<p>
<a href="<?php echo get_subdomain_full_url('rss', $CONF).'/podcast/'; ?>"><i class="fa fa-rss fa-2x fa-border"></i></a>
<a href="<?php echo get_page_url('rss', $CONF).'/podcast/'; ?>"><i class="fa fa-rss fa-2x fa-border"></i></a>
</p>
</div>
</div>

+ 3
- 3
podcast/view_post.php View File

@@ -80,7 +80,7 @@ if (isset($_GET['post']))
<div class="row">
<div class="col-sm-10 col-sm-offset-1 podcast-main">
<div class="podcast-post">
<h2 class="podcast-post-title text-center"><a href="<?php echo get_subdomain_full_url("podcast", $CONF); ?>/<?php echo $post_id; ?>" id="title_<?php echo $post_id; ?>"><?php echo $title; ?></a></h2>
<h2 class="podcast-post-title text-center"><a href="<?php echo get_page_url("podcast", $CONF); ?>/<?php echo $post_id; ?>" id="title_<?php echo $post_id; ?>"><?php echo $title; ?></a></h2>
<p class="podcast-post-meta text-center text-muted">
Posted on <?php echo date("F d, Y",strtotime($date)); ?>
<?php
@@ -99,7 +99,7 @@ if (isset($_GET['post']))
<?php
foreach ($files as $filename)
{
$file_path = get_subdomain_full_url("podcast", $CONF).'/Podcasts/'.$title.'/'.$filename;
$file_path = get_page_url("podcast", $CONF).'/Podcasts/'.$title.'/'.$filename;
$direct_path = $CONF['podcast_dir'].$title.'/'.$filename;
if (file_exists($direct_path))
@@ -118,7 +118,7 @@ if (isset($_GET['post']))
<?php
foreach ($files as $filename)
{
$file_path = get_subdomain_full_url("podcast", $CONF).'/Podcasts/'.$title.'/'.$filename;
$file_path = get_page_url("podcast", $CONF).'/Podcasts/'.$title.'/'.$filename;
$direct_path = $CONF['podcast_dir'].$title.'/'.$filename;
if (file_exists($direct_path))

+ 4
- 4
ricehalla/main.php View File

@@ -46,7 +46,7 @@
{
$username = $userTools->get($result['user_id'])->username;
$thumbnail_src = "../uploads/thumbnails/150_150_" . $result['url'];
$image_src = get_subdomain_full_url("u", $CONF).'/' . $result['url'];
$image_src = get_page_url("u", $CONF).'/' . $result['url'];
$user_vote = $db->select('votes', 'table_name=? AND row_id=? AND user_id=? ORDER BY id DESC LIMIT 1', array('ricehalla', $result['id'], $user->id));
$thumb_up = "btn-hover";
$thumb_down = "btn-hover";
@@ -71,7 +71,7 @@
(<?php echo $result['TotalPoints']; ?>)
</div>
<div class="col-sm-3">
<a href="<?php echo get_subdomain_full_url("ricehalla", $CONF).'/'.$result['id']; ?>" target="_blank" class="btn btn-sm btn-hover btn-primary"><span class="glyphicon glyphicon-link"></span></a>
<a href="<?php echo get_page_url("ricehalla", $CONF).'/'.$result['id']; ?>" target="_blank" class="btn btn-sm btn-hover btn-primary"><span class="glyphicon glyphicon-link"></span></a>
</div>
<?php
if ($logged_in)
@@ -96,7 +96,7 @@
?>
</div>
<div class="col-sm-2 filter-col">
<a href="<?php echo get_subdomain_full_url("www", $CONF); ?>/<?php echo $username; ?>"><?php echo $username; ?></a>
<a href="<?php echo get_page_url("home", $CONF); ?>/<?php echo $username; ?>"><?php echo $username; ?></a>
</div>
<div class="col-sm-2 filter-col">
<?php echo $result['date_added']; ?>
@@ -146,7 +146,7 @@
});
</script>
<div class="col-sm-2 filter-col">
<a href="#" class="modalButton" data-toggle="modal" data-img="<?php echo $image_src; ?>" data-url="<?php echo get_subdomain_full_url("u", $CONF).'/'.$result['url']; ?>" data-user="<?php echo $username; ?>" data-target="#viewCreation">
<a href="#" class="modalButton" data-toggle="modal" data-img="<?php echo $image_src; ?>" data-url="<?php echo get_page_url("u", $CONF).'/'.$result['url']; ?>" data-user="<?php echo $username; ?>" data-target="#viewCreation">
<img src="<?php echo $thumbnail_src; ?>" width="150" class="img-responsive img-rounded" alt="">
</a>
</div>

+ 3
- 3
ricehalla/view_image.php View File

@@ -19,7 +19,7 @@ if (isset($_GET['id']))
if ($result)
{
$username = $userTools->get($result['user_id'])->username;
$image_src = get_subdomain_full_url("u", $CONF).'/'.$result['url'];
$image_src = get_page_url("u", $CONF).'/'.$result['url'];
$user_vote = $db->select('votes', 'table_name=? AND row_id=? AND user_id=? ORDER BY id DESC LIMIT 1', array('ricehalla', $result['id'], $user->id));
$thumb_up = "btn-hover";
$thumb_down = "btn-hover";
@@ -132,7 +132,7 @@ if (isset($_GET['id']))
<div class="container">
<div class="row text-center">
<div class="col-sm-12 view_image" style="overflow: hidden;">
<a href="<?php echo get_subdomain_full_url("u", $CONF).'/'.$result['url']; ?>" value="<?php echo $image_src; ?>" target="_blank">
<a href="<?php echo get_page_url("u", $CONF).'/'.$result['url']; ?>" value="<?php echo $image_src; ?>" target="_blank">
<img src="<?php echo $image_src; ?>" class="img-responsive img-thumbnail" alt="">
</a>
</div>
@@ -160,6 +160,6 @@ if (isset($_GET['id']))
}
else
{
redirect(get_subdomain_full_url("www", $CONF));
redirect(get_page_url("home", $CONF));
}
?>

+ 4
- 4
rss/index.php View File

@@ -38,7 +38,7 @@ if ($_GET['content'])
$rssfeed .= '<rss version="2.0">';
$rssfeed .= '<channel>';
$rssfeed .= '<title><![CDATA['.$rss_title.']]></title>';
$rssfeed .= '<link>'.get_subdomain_full_url($rss_content, $CONF).'/'.$rss_author.'</link>';
$rssfeed .= '<link>'.get_page_url($rss_content, $CONF).'/'.$rss_author.'</link>';
$rssfeed .= '<description><![CDATA['.$rss_desc.']]></description>';
$rssfeed .= '<language>en-us</language>';
$rssfeed .= '<copyright>Copyright (C) 2013-'.date('Y', time()).' Teknik.io';
@@ -81,7 +81,7 @@ if ($_GET['content'])
$rssfeed .= '<item>';
$rssfeed .= '<title><![CDATA[' . $title . ']]></title>';
$rssfeed .= '<description><![CDATA[' . $post . ']]></description>';
$rssfeed .= '<link>' . get_subdomain_full_url("blog", $CONF) .'/'. $author->username .'/'. $post_id . '</link>';
$rssfeed .= '<link>' . get_page_url("blog", $CONF) .'/'. $author->username .'/'. $post_id . '</link>';
$rssfeed .= '<pubDate>' . date("D, d M Y H:i:s O",strtotime($date)) . '</pubDate>';
$rssfeed .= '</item>';
}
@@ -121,14 +121,14 @@ if ($_GET['content'])
foreach ($files as $filename)
{
$file_path = get_subdomain_full_url("podcast", $CONF).'/Podcasts/'.$title.'/'.$filename;
$file_path = get_page_url("podcast", $CONF).'/Podcasts/'.$title.'/'.$filename;
$direct_path = $CONF['podcast_dir'].$title.'/'.$filename;
$file_type = mime_content_type($direct_path);
$file_length = filesize($direct_path);
$rssfeed .= '<enclosure url="'.$file_path.'" length="'.$file_length.'" type="'.$file_type.'" />';
}
$rssfeed .= '<link>' . get_subdomain_full_url("podcast", $CONF) .'/' . $post_id . '</link>';
$rssfeed .= '<link>' . get_page_url("podcast", $CONF) .'/' . $post_id . '</link>';
$rssfeed .= '<pubDate>' . date("D, d M Y H:i:s O",strtotime($date)) . '</pubDate>';
$rssfeed .= '</item>';
}

+ 2
- 2
transparency/main.php View File

@@ -145,10 +145,10 @@
Here you can view all of Teknik's financial information, takedown requests and the actions we took, as well as some general statistics for the site's services.
</p>
<p>
If you would like to request additional information about Teknik, please feel free to contact us through our <a href="<?php echo get_subdomain_full_url("contact", $CONF); ?>" target="_blank">Contact Form</a> or by emailing us at <a href="mailto:support@<?php echo $CONF['host']; ?>">support@<?php echo $CONF['host']; ?></a>.
If you would like to request additional information about Teknik, please feel free to contact us through our <a href="<?php echo get_page_url("contact", $CONF); ?>" target="_blank">Contact Form</a> or by emailing us at <a href="mailto:support@<?php echo $CONF['host']; ?>">support@<?php echo $CONF['host']; ?></a>.
</p>
<p>
Want to make a donation? Visit our <a href="<?php echo get_subdomain_full_url("about", $CONF); ?>" target="_blank">About Page</a> and choose a donation method at the bottom.
Want to make a donation? Visit our <a href="<?php echo get_page_url("about", $CONF); ?>" target="_blank">About Page</a> and choose a donation method at the bottom.
</p>
<br />
<h2 class="text-center"><b>Statistics</b></h2>

+ 3
- 3
upload/delete_upload.php View File

@@ -35,16 +35,16 @@ if(isset($_GET))
}
else
{
header('Location: '.get_subdomain_full_url("error", $CONF).'/403');
header('Location: '.get_page_url("error", $CONF).'/403');
}
}
else
{
header('Location: '.get_subdomain_full_url("error", $CONF).'/404');
header('Location: '.get_page_url("error", $CONF).'/404');
}
}
else
{
header('Location: '.get_subdomain_full_url("error", $CONF).'/404');
header('Location: '.get_page_url("error", $CONF).'/404');
}
?>

+ 1
- 1
upload/generate_delete_link.php View File

@@ -16,7 +16,7 @@ if(isset($_POST) && isset($_SESSION))
$post_id = $db->update($data, 'uploads', 'filename=?', array($filename));
unset($_POST);
echo json_encode(array('result' => array('url' => get_subdomain_full_url("u", $CONF).'/'.$file_db['filename'].'/'.$delete_key)));
echo json_encode(array('result' => array('url' => get_page_url("u", $CONF).'/'.$file_db['filename'].'/'.$delete_key)));
}
else
{

+ 1
- 1
upload/lib/download.php View File

@@ -41,6 +41,6 @@ if (file_exists($file_path) && $file_db)
}
else
{
header('Location: '.get_subdomain_full_url("error", $CONF).'/404');
header('Location: '.get_page_url("error", $CONF).'/404');
}
?>

+ 2
- 2
upload/main.php View File

@@ -36,7 +36,7 @@
<br />
<div class="well text-center">Each file is encrypted on upload using an AES-256-CBC cipher. If you wish to view the file decrypted, you must use the direct Teknik link.</div>
<div class="text-center">
Useful Tools: <a href="<?php echo get_subdomain_full_url('git', $CONF); ?>/Tools.git/blob/master/Upload/upload.sh">Bash Upload Script</a>
Useful Tools: <a href="<?php echo get_page_url('git', $CONF); ?>/Tools.git/blob/master/Upload/upload.sh">Bash Upload Script</a>
<br />
<br />
You can now upload your screenshots automatically using <a href="https://github.com/KittyKatt/screenFetch">Screenfetch</a>!
@@ -63,7 +63,7 @@ Dropzone.options.TeknikUpload = {
'+file.name+' \
</div> \
<div class="col-sm-3"> \
<a href="<?php echo get_subdomain_full_url('u', $CONF); ?>/'+full_name+'" target="_blank" class="alert-link"><?php echo get_subdomain_full_url('u', $CONF); ?>/'+full_name+'</a> \
<a href="<?php echo get_page_url('u', $CONF); ?>/'+full_name+'" target="_blank" class="alert-link"><?php echo get_page_url('u', $CONF); ?>/'+full_name+'</a> \
</div> \
<div class="col-sm-3"> \
<button type="button" class="btn btn-default btn-xs generate-delete-link-'+short_name+'" id="'+full_name+'">Generate Deletion URL</button> \

Loading…
Cancel
Save