Currently we have some license issues. We are working on it.

Commit f06c9246 authored by root's avatar root
Browse files

fix missing saverating file

parent 68f60f71
This diff is collapsed.
......@@ -17,5 +17,5 @@
font-size:9px;
}
.content {
margin-left: 299px !important;
margin-left: 2px !important;
}
<?php
include('config.php');
if (!$_POST['username']){
echo "no username given";
die;
}
if (!$_POST['userurl']){
echo "no userurl given";
die;
}
if (!$_POST['domain']){
echo "no pod domain given";
die;
}
if (!$_POST['comment']){
echo "no comment";
die;
}
if (!$_POST['rating']){
echo "no rating given";
die;
}
$domain = pg_escape_string($_POST['domain']);
$comment = pg_escape_string($_POST['comment']);
$rating = pg_escape_string($_POST['rating']);
$username = pg_escape_string($_POST['username']);
$userurl = pg_escape_string($_POST['userurl']);
$dbh = pg_connect("dbname=$pgdb user=$pguser password=$pgpass");
if (!$dbh) {
die("Error in connection: " . pg_last_error());
}
$sql = "INSERT INTO rating_comments (domain, comment, rating, username, userurl) VALUES('$domain', '$comment', '$rating', '$username', '$userurl')";
$result = pg_query($dbh, $sql);
if (!$result) {
die("Error in SQL query: " . pg_last_error());
}
$to = $adminemail;
$subject = "New rating added to poduptime ";
$message = "Pod:" . $_POST["domain"] . "\n\n";
$headers = "From: ".$_POST["email"]."\r\n";
@mail( $to, $subject, $message, $headers );
echo "Comment posted!";
pg_free_result($result);
pg_close($dbh);
?>
......@@ -10,7 +10,7 @@
<script type="text/javascript" src="http://c807316.r16.cf2.rackcdn.com/jquery-ui-1.8.21.custom.min.js"></script>
<script src="OpenLayers.js"></script>
<link href="http://c807316.r16.cf2.rackcdn.com/jquery-ui-1.8.21.custom.css" rel="stylesheet" type="text/css"/>
<link rel="stylesheet" href="http://c790230.r16.cf2.rackcdn.com/bootstrap.min.css">
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/newstyle.css" />
<link rel="stylesheet" href="css/facebox.css" />
......@@ -68,16 +68,14 @@ s1.parentNode.insertBefore(s, s1);
<div class="container-fluid">
<div class="sidebar">
<div class="adsense2">
<script type="text/javascript"><!--
google_ad_client = "ca-pub-3662181805557062";
/* poduptimenew */
google_ad_slot = "3969028081";
google_ad_width = 300;
google_ad_height = 250;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- poduptimebigger -->
<ins class="adsbygoogle"
style="display:inline-block;width:336px;height:280px"
data-ad-client="ca-pub-3662181805557062"
data-ad-slot="8271090637"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
</div>
<a href="https://market.android.com/details?id=appinventor.ai_david_morley.DiasporaPoduptime"><img src="http://c807316.r16.cf2.rackcdn.com/android-dude128.png"></a>
......@@ -88,13 +86,12 @@ src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
<?php if ($hidden == "true") {echo "<a href='http://podupti.me' class='btn danger large'>NOTICE: These pods are Hidden and have problems, click here to go to working pods</a>";} include("show.php"); ?>
</div>
<div id="add">
Pod Host? <u style="cursor: pointer; cursor: hand;">Click here</u> to add/manage your listing.<br>
Pod Host? <u style="cursor: pointer; cursor: hand;">Click here</u> to add your listing.<br>
</div>
<div id="info">
Data last refreshed at: <?php echo date("F d Y H:i:s.", filemtime($lastfile)) ?> Pacific Time<br>
Poduptime is run by <a href="https://diasp.org/u/davidmorley" target=_new>David Morley</a> and is open source on <a href="https://github.com/diasporg/Poduptime">GitHub</a><br>
I also run the pods <a href="https://diasp.org/?2" target=_new>diasp.org</a> and the <a href="http://dia.so" target=_new>dia.so</a> site.<br>
Some pods are <a href="http://podupti.me/?hidden=true">Hidden</a> That have too many issues.<br><br>
Poduptime is run by <a href="https://diasp.org/u/davidmorley" target=_new>David Morley</a> and is open source on <a href="https://github.com/diasporg/Poduptime">GitHub</a> Feel free to contribute with pull requests or bugs!<br>
Some pods are <a href="http://podupti.me/?hidden=true">Hidden</a> hat have too many issues, see <a href="https://github.com/diasporg/Poduptime/wiki">Wiki</a> for more.<br><br>
</div>
<div id="howto" style="display:none; margin-left:50px">
<br>
......
......@@ -14,7 +14,7 @@ echo "var domain = \"{$_GET['domain']}\";";
?>
$.ajax({
type: "POST",
url: "saverating.php",
url: "db/saverating.php",
data: "username="+$('#username').val()+"&userurl="+$('#userurl').val()+"&comment="+$('#comment').val()+"&rating="+$('#rating').val()+"&domain="+domain,
success: function(msg){
if (msg == 1) {
......@@ -77,4 +77,4 @@ EOF;
pg_free_result($result);
pg_close($dbh);
?>
</div>
\ No newline at end of file
</div>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment