|
...
|
...
|
@@ -55,7 +55,7 @@ function submitted()
|
|
55
|
55
|
{
|
|
56
|
56
|
unset($catstring);
|
|
57
|
57
|
$result3 = dbquery("SELECT catid, category FROM ".TABLEPREFIX."fanfiction_categories WHERE FIND_IN_SET(catid, '".$story['catid']."')");
|
|
58
|
|
- while($cats = dbassoc($result3)) {
|
|
|
58
|
+ while($cats = dbfetcharray($result3)) {
|
|
59
|
59
|
$catstring[] = "<a href=\"categories.php?catid=".$cats['catid']."\">".$cats['category']."</a>";
|
|
60
|
60
|
}
|
|
61
|
61
|
if(!$admincats || sizeof(array_intersect(explode(",", $story['catid']), explode(",", $admincats)))) {
|
|
...
|
...
|
@@ -79,7 +79,7 @@ function validate( ) {
|
|
79
|
79
|
$output = "<center><h4>"._VIEWSUBMITTED."</h4></center>";
|
|
80
|
80
|
if($_GET['validate'] == "yes") {
|
|
81
|
81
|
$storyquery = dbquery("SELECT story.validated, story.catid, story.sid, story.title, story.summary, story.uid, author.penname, chapter.inorder FROM ".TABLEPREFIX."fanfiction_stories as story, ".TABLEPREFIX."fanfiction_chapters as chapter, ".TABLEPREFIX."fanfiction_authors as author WHERE author.uid = story.uid AND chapter.sid = story.sid AND chapter.chapid ='".$_GET['chapid']."' LIMIT 1");
|
|
82
|
|
- list($validated, $catid, $sid, $title, $summary, $authoruid, $author, $inorder) = dbassoc($storyquery);
|
|
|
82
|
+ list($validated, $catid, $sid, $title, $summary, $authoruid, $author, $inorder) = dbfetcharray($storyquery);
|
|
83
|
83
|
if($admincats == "0" || sizeof(array_intersect(explode(",", $catid), explode(",", $admincats)))) {
|
|
84
|
84
|
include("includes/emailer.php");
|
|
85
|
85
|
if($validated != "1") {
|
|
...
|
...
|
@@ -93,7 +93,7 @@ function validate( ) {
|
|
93
|
93
|
$subject = _NEWSTORYAT;
|
|
94
|
94
|
$mailtext = sprintf(_AUTHORALERTNOTE, $title, $author, $summary, $sid);
|
|
95
|
95
|
$favorites = dbquery("SELECT author.uid, email, penname FROM ".TABLEPREFIX."fanfiction_favauth as fav, ".TABLEPREFIX."fanfiction_authors as author WHERE fav.favuid = $authoruid AND fav.uid = author.uid");
|
|
96
|
|
- while($favuser = dbassoc($favorites)) {
|
|
|
96
|
+ while($favuser = dbfetcharray($favorites)) {
|
|
97
|
97
|
sendemail($favuser['penname'], $favuser['email'], $sitename, $siteemail, $subject, $mailtext, "html");
|
|
98
|
98
|
}
|
|
99
|
99
|
}
|
|
...
|
...
|
@@ -102,7 +102,7 @@ function validate( ) {
|
|
102
|
102
|
$subject = _STORYALERT;
|
|
103
|
103
|
$mailtext = sprintf(_STORYALERTNOTE, $title, $author, $sid, $inorder);
|
|
104
|
104
|
$favorites = dbquery("SELECT author.uid, penname, email FROM ".TABLEPREFIX."fanfiction_favstor as fav, ".TABLEPREFIX."fanfiction_authors as author WHERE sid = '$sid' AND fav.uid = author.uid");
|
|
105
|
|
- while($favuser = dbassoc($favorites)) {
|
|
|
105
|
+ while($favuser = dbfetcharray($favorites)) {
|
|
106
|
106
|
sendemail($favuser['penname'], $favuser['email'], $sitename, $siteemail, $subject, $mailtext, "html");
|
|
107
|
107
|
}
|
|
108
|
108
|
}
|
|
...
|
...
|
@@ -115,14 +115,14 @@ function validate( ) {
|
|
115
|
115
|
}
|
|
116
|
116
|
else {
|
|
117
|
117
|
$result = dbquery("SELECT story.title as storytitle, story.sid, story.catid, story.rid, story.gid, story.charid, story.wid, story.summary as storysummary, chapter.chapid, chapter.title, chapter.storytext, author.penname, chapter.uid as uid FROM ".TABLEPREFIX."fanfiction_authors as author, ".TABLEPREFIX."fanfiction_stories as story, ".TABLEPREFIX."fanfiction_chapters as chapter WHERE chapter.chapid = '".$_GET['chapid']."' AND chapter.sid = story.sid AND chapter.uid = author.uid");
|
|
118
|
|
- $story = dbassoc($result);
|
|
|
118
|
+ $story = dbfetcharray($result);
|
|
119
|
119
|
$output .= "<b>"._AUTHOR.":</b> ".$story['penname']."<br />";
|
|
120
|
120
|
$output .= "<b>"._TITLE.":</b> ".$story['storytitle'].": ".$story['title'];
|
|
121
|
121
|
$output .= "<br />";
|
|
122
|
122
|
$result3 = dbquery("SELECT catid, category FROM ".TABLEPREFIX."fanfiction_categories WHERE FIND_IN_SET(catid, '".$story['catid']."')");
|
|
123
|
123
|
$catstring = "";
|
|
124
|
124
|
$count = 0;
|
|
125
|
|
- while($cats = dbassoc($result3)) {
|
|
|
125
|
+ while($cats = dbfetcharray($result3)) {
|
|
126
|
126
|
if($count > 0) $catstring .= ", ";
|
|
127
|
127
|
$catstring .= "<a href=\"categories.php?catid=".$cats['catid']."\">".$cats['category']."</a>";
|
|
128
|
128
|
$categories[] = $cats['catid'];
|
|
...
|
...
|
@@ -184,9 +184,9 @@ function yesletter( ) {
|
|
184
|
184
|
}
|
|
185
|
185
|
else {
|
|
186
|
186
|
$authorquery = dbquery("SELECT email,penname FROM ".TABLEPREFIX."fanfiction_authors WHERE uid = '".$_GET['uid']."' LIMIT 1");
|
|
187
|
|
- $author = dbassoc($authorquery);
|
|
|
187
|
+ $author = dbfetcharray($authorquery);
|
|
188
|
188
|
$storyquery = dbquery("SELECT story.title, chapter.title as chapter FROM ".TABLEPREFIX."fanfiction_stories as story, ".TABLEPREFIX."fanfiction_chapters as chapter WHERE chapter.chapid = '".$_GET['chapid']."' AND chapter.sid = story.sid LIMIT 1");
|
|
189
|
|
- $story = dbassoc($storyquery);
|
|
|
189
|
+ $story = dbfetcharray($storyquery);
|
|
190
|
190
|
$letter = file_get_contents("messages/thankyou.txt");
|
|
191
|
191
|
echo "<body>";
|
|
192
|
192
|
echo "<table><tr><td>Story:</td><td>".$story['title'].": ".$story['chapter']."</td></tr>";
|
|
...
|
...
|
@@ -221,9 +221,9 @@ function noletter( ) {
|
|
221
|
221
|
else
|
|
222
|
222
|
{
|
|
223
|
223
|
$authorquery = dbquery("SELECT email,penname FROM ".TABLEPREFIX."fanfiction_authors WHERE uid = '".$_GET['uid']."' LIMIT 1");
|
|
224
|
|
- $author = dbassoc($authorquery);
|
|
|
224
|
+ $author = dbfetcharray($authorquery);
|
|
225
|
225
|
$storyquery = dbquery("SELECT story.title, chapter.title as chapter FROM ".TABLEPREFIX."fanfiction_stories as story, ".TABLEPREFIX."fanfiction_chapters as chapter WHERE chapter.chapid = '".$_GET['chapid']."' AND chapter.sid = story.sid LIMIT 1");
|
|
226
|
|
- $story = dbassoc($storyquery);
|
|
|
226
|
+ $story = dbfetcharray($storyquery);
|
|
227
|
227
|
$letter = file_get_contents("messages/nothankyou.txt");
|
|
228
|
228
|
echo "<body>";
|
|
229
|
229
|
echo "<table><tr><td>Story:</td><td>".$story['title'].": ".$story['chapter']."</td></tr>";
|