mirror of
https://github.com/gamaio/lobli.git
synced 2024-12-22 19:52:40 +00:00
Move Redis connection to db.php and change shorten icon.
Since I will be using Redis from multiple files, the connection to the server should be in the same file as the other DB connection. This icon looks a little bit better I think.
This commit is contained in:
parent
4a66e9aa3b
commit
f0f858950d
@ -1,4 +1,7 @@
|
||||
<?php
|
||||
$shortdb = new mysqli('localhost', 'short', 'password', 'short'); // Connect to link shortener DB
|
||||
if($shortdb->connect_errno > 0) die('Unable to connect to database [' . $shortdb->connect_error . '] - Check dbsettings.php');
|
||||
?>
|
||||
|
||||
$redis = new Redis();
|
||||
$redis->connect('127.0.0.1', 6379);
|
||||
?>
|
||||
|
@ -12,8 +12,6 @@
|
||||
$_SESSION['catch'] = $catchid.":".$catchVal;
|
||||
|
||||
require('Include/PHP/db.php');
|
||||
$redis = new Redis();
|
||||
$redis->connect('127.0.0.1', 6379);
|
||||
|
||||
function followLink($shortdb, $redis, $link){
|
||||
$link = $shortdb->real_escape_string(strtolower(stripslashes(strip_tags($link))));
|
||||
@ -126,7 +124,7 @@
|
||||
<input type="hidden" name="<?php echo $catchid; ?>" value="<?php echo $catchVal; ?>"/>
|
||||
<span class="input-group-btn">
|
||||
<button type="submit" class="btn btn-primary btn-lg submitbtn" id="short-button">
|
||||
<span class="glyphicon glyphicon-share-alt icon-rotate"></span>
|
||||
<span class="glyphicon glyphicon-chevron-down"></span>
|
||||
</button>
|
||||
</span>
|
||||
</div><!-- /input-group -->
|
||||
|
Loading…
Reference in New Issue
Block a user