UberCMS Client Voting Help

Status
Not open for further replies.

JayC

Well-Known Member
Aug 8, 2013
5,505
1,401
In my page-client.tpl file:

require_once 'findretros_config.php';
require_once 'findretros.php';

$FindRetros = new FindRetros();

if($FindRetros->hasClientVoted()) {

echo 'You have voted!';

}else{

// echo 'You have yet to vote!';

$FindRetros->redirectClientToVote();

}

When I save it and reload client it says:


Warning: require_once(findretros_config.php): failed to open stream: No such file or directory in C:\xampp\htdocs\includes\tpl\page-client.tpl on line 5

Fatal error: require_once(): Failed opening required 'findretros_config.php' (include_path='.;C:\xampp\php\PEAR') in C:\xampp\htdocs\includes\tpl\page-client.tpl on line 5

Also I have the files there lol..
 

BIOS

ಠ‿ಠ
Apr 25, 2012
906
247
Are the files still in the Vote-Validator-master folder in root or just in root on their own? If they're in the folder change the require to this 'Vote-Validator-master/findretros_config.php'; and same with the other require.
 

JayC

Well-Known Member
Aug 8, 2013
5,505
1,401
They are not in the folder sorry 
Bump, help please
 

13rad

King
Sep 15, 2013
156
36
<?php
if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) { $_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_X_FORWARDED_FOR']; }
if (!isset($_GET['novote']) && $_GET['url'] != 'register') {
$context = stream_context_create(array('https' => array('timeout' => 0.5)));
$data = file_get_contents(' ' . $_SERVER['REMOTE_ADDR'], 0, $context);
if($data == 3) {
header("Location: ");
exit;
}
}
?>
Put this at ur header and try it.
 
Status
Not open for further replies.

Users who are viewing this thread

Top