Пример #1
0
		', $quest_cols[2], $id);
    if ($rows_qe) {
        $object['ends'] = array();
        foreach ($rows_qe as $numRow => $row) {
            $object['ends'][] = GetQuestInfo($row, 0xffffff);
        }
    }
    unset($rows_qe);
    // Положения объектофф:
    $data = $DB->select('SELECT position_y as y, position_x as x, map as m, spawntimesecs FROM gameobject WHERE id = ?d', $id);
    position($data);
    save_cache(3, $object['entry'], $object);
}
global $page;
$page = array('Mapper' => false, 'Book' => false, 'Title' => $object['name'] . ' - ' . $smarty->get_config_vars('Objects'), 'tab' => 0, 'type' => 2, 'typeid' => $object['entry'], 'path' => '[0,5,' . $object['type'] . ']');
if ($object['pagetext']) {
    $page['Book'] = true;
}
$page['Mapper'] = true;
$smarty->assign('page', $page);
// Комментарии
$smarty->assign('comments', getcomments($page['type'], $page['typeid']));
if (isset($allitems)) {
    $smarty->assign('allitems', $allitems);
}
if (isset($object)) {
    $smarty->assign('object', $object);
}
// Количество MySQL запросов
$smarty->assign('mysql', $DB->getStatistics());
$smarty->display('object.tpl');
Пример #2
0
    //---shared---//
    if ($sharestatus == "yes") {
        $topleftbutton = "checkedbutton";
        include "getsharechain.php";
        $sharechainpane = getsharechain($siteid, $myid);
    } else {
        $topleftbutton = "sharebutton";
    }
    //---comments---//
    include "getcomments.php";
    if (isset($ownerid) and $ownerid == $myid) {
        $slashurl = addslashes($url);
        $arraygetcomments = getcomments($slashurl, "myproject", $myid);
    } else {
        $slashurl = addslashes($url);
        $arraygetcomments = getcomments($slashurl, "project", $myid);
    }
    $commentcount = $arraygetcomments[0];
    $pagecomments = $arraygetcomments[1];
} else {
    $topleftbutton = "error";
    $searchbar = "error";
    $commentspane = "error";
}
//---navbar---//
//---hidden go button---//
$hiddengobutton = "\n\t\t<!-- hidden go button -->\n\t\t\t<input name='gobutton' type='submit' value='>>>' style='width: 0; height: 0; padding: 0; border: 0; margin: 0;' aria-hidden='false' tabindex='-1'>\n\t\t";
//---topleft button---//
//---about button---//
if ($topleftbutton == "aboutbutton") {
    $topleftbutton = "\n\t\t\t\t<!-- about button -->\n\t\t\t\t\t<a id='aboutbutton' href='index.php?p=about' tabindex='0' onkeyup='if (event.keyCode == 32) document.getElementById(&#39;aboutbutton&#39;).click()' class='btn btn-primary navbarbutton' title='what is sharewaves?'>\n\t\t\t\t\t\t<img src='sharewhite.png' style='height: 100%; width: auto'><p class='navbartext'>hare</p></img>\n\t\t\t\t\t</a>\n\t\t\t\t\t<a id='extensionsigninbutton' href='http://share-waves.com?p=signin' target='_blank' class='btn btn-primary navbarbutton' title='signin'>\n\t\t\t\t\t\t<img src='sharewhite.png' style='height: 100%; width: auto'><p class='navbartext'>ign in</p></img>\n\t\t\t\t\t</a>\n\t\t\t\t";
Пример #3
0
        $msg = str_replace("\n", " ", $msg);
        $msg = str_replace("\r", " ", $msg);
        require_once CODE . 'bbParser.php';
        $bbcode = new bbParser($disableURL);
        $msg = $bbcode->getHtml($msg);
        addcomments((int) $idmess, $commentsfilename, $msg, $yourname, $email);
        $msg = '';
        @setcookie('flood_news', $newsflood, time() + $newsflood);
    }
}
if (empty($yourname)) {
    $yourname = $_SESSION['name'];
}
if (file_exists($commentsfilename)) {
    $commentpage = isset($_GET['commentpage']) ? (int) $_GET['commentpage'] : 0;
    $arrcomments = getcomments($commentsid, $commentsfilename, $moder_comments);
    $arrcomments = array_reverse($arrcomments);
    $countcomments = getcountcomments($commentsid, $commentsfilename, $moder_comments);
    echo '<br /><br /><div class="comment_head"><a name="comment_begin"></a><h3>' . __('Комментарии') . ':</h3></div><hr>';
    if (count($arrcomments) == 0) {
        echo '<div class="comment"><br/>' . __('Нет комментариев') . '.<br/></div>';
    } else {
        if ($commentpage * $commentsperpage_comments > count($arrcomments)) {
            $commentpage = 0;
        }
        $i = $commentpage * $commentsperpage_comments;
        if ($commentpage == 0) {
            $j = min(count($arrcomments), $commentsperpage_comments);
        } else {
            $j = min(count($arrcomments), $commentpage * $commentsperpage_comments + $commentsperpage_comments);
        }
Пример #4
0
function news($theme)
{
    include "modules/getcomments.php";
    include "includes/smileyparse.php";
    if (isset($_GET["article"])) {
        $article_id = $_GET["article"];
        $query = "SELECT * FROM news WHERE id = '{$article_id}'";
        $result = mysql_query($query);
        $num = mysql_numrows($result);
        if ($num == 0) {
            echo '<div class="entry">No such article!</div>';
        } else {
            $id = mysql_result($result, 0, "id");
            $title = mysql_result($result, 0, "title");
            $title = stripslashes($title);
            $details = mysql_result($result, 0, "details");
            $article = mysql_result($result, 0, "short_article");
            $article = parseSmiley($article);
            $article = stripslashes($article);
            $extended_article = mysql_result($result, 0, "extended_article");
            $extended_article = parseSmiley($extended_article);
            $extended_article = stripslashes($extended_article);
            ?>
			<div class="entry">
			<h1><a href="index.php?module=news&article=<?php 
            echo $id;
            ?>
" class="h1"><?php 
            echo $title;
            ?>
</a></h1>
			<?php 
            echo $article;
            ?>
<br />
			<?php 
            if ($extended_article != "") {
                echo "<br />{$extended_article}";
            }
            ?>
			<hr>
			<span class="posttime"><?php 
            echo $details;
            ?>
</span><br />
			<?php 
            include "modules/comments.php";
            comments($id, $title);
            ?>
			</div>
			<?php 
        }
    } else {
        $query = "SELECT * FROM news ORDER BY id DESC LIMIT 5";
        $result = mysql_query($query);
        $num = mysql_numrows($result);
        if ($num == 0) {
            echo '<div class="entry">No posts in database</div>';
        } else {
            $i = 0;
            while ($i < $num) {
                $id = mysql_result($result, $i, "id");
                $title = mysql_result($result, $i, "title");
                $details = mysql_result($result, $i, "details");
                $article = mysql_result($result, $i, "short_article");
                $article = parseSmiley($article);
                $extended_article = mysql_result($result, $i, "extended_article");
                ?>
				<div class="entry">
				<h1><a href="index.php?module=news&article=<?php 
                echo $id;
                ?>
" class="h1"><?php 
                echo $title;
                ?>
</a></h1>
				<span class="posttime"><?php 
                echo $details;
                ?>
</span><br />
				<?php 
                echo $article;
                ?>
<br />
				<?php 
                if ($extended_article != "") {
                    ?>
					<br /><a href="index.php?module=news&article=<?php 
                    echo $id;
                    ?>
">Read More >></a>
					<?php 
                }
                ?>
				<hr>
				<span class="rightalign"><?php 
                getcomments($id);
                ?>
</span><br />
				</div>
				<?php 
                $i++;
            }
        }
    }
}
Пример #5
0
" class="trash"><span class="glyphicon glyphicon-trash"></span></a>
                                    <a id="<?php 
        echo $task['item_id'];
        ?>
" class="flag"><span class="glyphicon glyphicon-ok"></span></a>
                                </div>
                                    <?php 
    }
    ?>
                            <div class="actionBox">
                                <ul id="commentList-<?php 
    echo $task['item_id'];
    ?>
">                                
                                    <?php 
    $comments = getcomments($task['item_id']);
    foreach ($comments as $comment) {
        ?>
                                        <li id="liComment-<?php 
        echo $comment['comment_id'];
        ?>
">
                                            <div class="commentText">
                                                <p class="comment" id="comment-<?php 
        echo $comment['comment_id'];
        ?>
"><?php 
        echo $comment['comment_text'];
        ?>
</p> 
                                                <?php 
include "db-connection.php";
include "getters.php";
$action = filter_input(INPUT_POST, 'action');
session_start();
include_once '../session_check.php';
//$_SESSION['user_id'] = 1;
$user_id = $_SESSION['user_id'];
switch ($action) {
    case "Insert":
        $comment_text = filter_input(INPUT_POST, 'commentText');
        $item_id = filter_input(INPUT_POST, 'itemId');
        $created_date = date('Y-m-d H:i:s');
        $statement = $db->prepare("INSERT INTO comments VALUES (NULL, :comment_text, :user_id, :item_id, :created_date)");
        $statement->execute(array(":comment_text" => $comment_text, ":user_id" => $user_id, ":item_id" => $item_id, ":created_date" => $created_date));
        $comments = getcomments($item_id);
        echo json_encode($comments);
        break;
    case "Update":
        $comment_text = filter_input(INPUT_POST, 'commentText');
        $comment_id = filter_input(INPUT_POST, 'commentId');
        $user_id = filter_input(INPUT_POST, 'userId');
        $statement = $db->prepare("UPDATE comments set comment_text= :comment_text where comment_id= :comment_id and user_id= :user_id");
        $statement->execute(array(":comment_text" => $comment_text, ":user_id" => $user_id, ":comment_id" => $comment_id));
        if ($statement->rowCount()) {
            echo $comment_id;
        } else {
            echo 'You are not allowed to do update.';
        }
        break;
    case "Delete":
Пример #7
0
        }
    }
    //---update navbar---//
    include "getcomments.php";
    $arraygetcomments = getcomments($p, $pagetype, $myid);
    $commentcount = $arraygetcomments[0];
    $pagecomments = $arraygetcomments[1];
    //---tips---//
    if (isset($_SESSION["jumblies"]) and isset($_SESSION["tip"])) {
        include "tips.php";
        $_SESSION["tip"] = updatetips("comment", $_SESSION["tip"], $myid);
        $helppane = displaytip($pagetype, $myid);
    } else {
        $helppane = "";
    }
    echo $commentcount . ":|:|:|:" . $helppane . ":|:|:|:" . $pagecomments;
} elseif (!empty($_POST["p"]) and $myid > 0) {
    include "getcomments.php";
    $arraygetcomments = getcomments(ltrim($_POST["p"], "c_"), $pagetype, $myid);
    $commentcount = $arraygetcomments[0];
    $pagecomments = $arraygetcomments[1];
    //---tips---//
    if (isset($_SESSION["jumblies"]) and isset($_SESSION["tip"])) {
        include "tips.php";
        $_SESSION["tip"] = updatetips("comment", $_SESSION["tip"], $myid);
        $helppane = displaytip($pagetype, $myid);
    } else {
        $helppane = "";
    }
    echo $commentcount . ":|:|:|:" . $helppane . ":|:|:|:" . $pagecomments;
}
Пример #8
0
    inserttable('spacecomments', $setsqlarr);
    if ($rates > 0) {
        $goodrate = $rates;
        $badrate = 0;
    } elseif ($rates < 0) {
        $goodrate = 0;
        $badrate = 0 - $rates;
    } else {
        $goodrate = 0;
        $badrate = 0;
    }
    $_SGLOBAL['db']->query('UPDATE ' . tname('spaceitems') . ' SET lastpost=\'' . $_SGLOBAL['timestamp'] . '\', replynum=replynum+1,goodrate=goodrate+' . $goodrate . ',badrate=badrate+' . $badrate . ' WHERE itemid=\'' . $item['itemid'] . '\'');
    //评分完成
    if (empty($mode)) {
        $item['replynum']++;
        $html = getcomments($item);
        $html = jsstrip($html);
        print <<<EOF
\t\t<script language="javascript">
\t\tparent.document.getElementById('xspace-itemreply').innerHTML = "{$html}";
\t\tparent.document.getElementById('xspace-itemreply').scrollIntoView();
\t\tparent.document.getElementById('xspace-phpframe').src = "about:blank";
\t\t</script>
EOF;
    } else {
        showxml($blang['rates_succeed']);
    }
} elseif ($action == 'modelrate') {
    //快捷评分
    $rates = 1;
    $resultmodels = array();
Пример #9
0
 *
 *@return echoes the coments
 *
 **/
function writecomment($user, $coment)
{
    echo '<div class="comment">
		  <h5><b>' . htmlspecialchars($user) . ' Says:</b></h5>
		  <p style="text-indent:40px;text-align:justify">' . htmlspecialchars($coment) . '</p>
		</div>';
}
if (isset($_SESSION['usrid'])) {
    if (isset($_POST['comment']) && isset($_POST['idvideo'])) {
        if ($_POST['comment'] != "") {
            if (insertcomment($_SESSION['usrid'], $_POST['idvideo'], $_POST['comment'], date('Y/m/d'))) {
                if ($lastcomments = getcomments(20, $_POST['idvideo'])) {
                    echo 'posted ';
                    while ($row = pg_fetch_array($lastcomments)) {
                        writecomment($row['username'], $row['coment']);
                    }
                } else {
                    echo 'noposted';
                }
            } else {
                echo 'noposted';
            }
        } else {
            echo 'nocomment';
        }
    } else {
        echo 'notdata';
Пример #10
0
    $skunit['UnitID2'][$i] = $arr[2];
    $skunit['Layout'][$i] = $arr[3];
    $skunit['Range'][$i] = $arr[4];
    $skunit['Interval'][$i] = $arr[5];
    $skunit['Target'][$i] = $arr[6];
    $skunit['Flag'][$i] = hexdec($arr[7]);
    $i++;
}
if ($debug) {
    print "[Debug] Read unit_db Memory: " . print_mem() . "\n";
}
fclose($unitdb);
$putsk = "";
// initialize variable for file_put_contents.
// Publish all comments
$putsk .= getcomments(defined('RENEWAL') ? true : false);
$putsk .= "skill_db: (\n";
// Get Main Skilldb File
$file = "skill_db.txt";
$skmain = fopen(DIRPATH . $file, "r") or die("Unable to open '" . DIRPATH . $file . "'.\n");
print "Reading '" . DIRPATH . $file . "' ...\n";
$linecount = 0;
// Get Number of entries
while (!feof($skmain)) {
    $line = fgets($skmain);
    if (substr($line, 0, 2) == "//" || strlen($line) < 10) {
        continue;
    }
    $linecount++;
}
if ($debug) {
Пример #11
0
        if ($row["profileid"] == $myid) {
            $p = $myid;
            $pagetype = "myprofile";
        } else {
            $profileid = $row["profileid"];
            $strSQL4 = "SELECT * FROM users WHERE userid = '{$profileid}' ";
            $rs = mysql_query($strSQL4) or die(mysql_error());
            $row = mysql_fetch_array($rs);
            $p = $row["userid"];
            $pagetype = "profile";
        }
    } else {
        $p = $row["url"];
        $slashp = addslashes($p);
        $strSQL5 = "SELECT * FROM masters WHERE url = '{$p}' ";
        $rs = mysql_query($strSQL5) or die(mysql_error());
        $row = mysql_fetch_array($rs);
        if ($row['owner'] == $myid) {
            $pagetype = "myproject";
        } else {
            $pagetype = "project";
        }
    }
    //---update commentspane---//
    include "getcomments.php";
    $arraygetcomments = getcomments($p, $pagetype, $myid);
    $commentcount = $arraygetcomments[0];
    $pagecomments = $arraygetcomments[1];
    $commentformbar = "\n\t\t\t<form onsubmit='commentbutton(&#39;c_" . $p . "&#39;);' action='javascript:void(0);' style='margin-bottom: 0px'>\n\t\t\t\t<div id='commentsform' class='searchform input-group' style='padding-top: 0px'>\n\t\t\t\t\t<input id='commentbox' name='comment' type='text' class='form-control searchfield' style='text-align: left; margin-top: 5px; border: 0px; border-top-right-radius: 0px; border-bottom-right-radius: 0px' autocomplete='off'></input>\n\t\t\t\t\t<span class='input-group-addon' style='padding: 0px; margin: 0px; border-radius: 0px; border: 0px; background-color: rgba(048,122,183,1);'>\n\t\t\t\t\t\t<div id='c_" . $p . "' class='btn btn-success' tabindex='0' style='margin-top: 5px; padding-left: 30px; padding-right: 30px; min-height: 32px; border-radius: 0; border-top-right-radius: 4px; border-bottom-right-radius: 4px; min-height: 32px' onclick='commentbutton(this.id)' onkeyup='if (event.keyCode == 32) document.getElementById(&#39;c_" . $p . "&#39;).click()' title='post your comment'>\n\t\t\t\t\t\t\t<span class='glyphicon glyphicon-comment divbuttonglyph' aria-hidden='false'>\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</span>\n\t\t\t\t</div>\n\t\t\t</form>\n\t\t";
    echo $commentcount . ":|:|:|:" . $pagecomments . ":|:|:|:" . $commentformbar;
}
Пример #12
0
     }
 }
 foreach ($arraysitesid as $siteid) {
     $strSQL7 = "UPDATE branches SET observerqueue=CONCAT(observerqueue,'{$myid},') WHERE siteid = '{$siteid}' ";
     mysql_query($strSQL7) or die(mysql_error());
 }
 //---wavescount---//
 $strSQL17 = "SELECT * FROM branches WHERE observerqueue LIKE '%{$myid}%' ";
 $rs = mysql_query($strSQL17) or die(mysql_error());
 $wavescount = mysql_num_rows($rs);
 if ($wavescount == 0) {
     $wavescount = "";
 }
 //---update navbar---//
 include "getcomments.php";
 $arraygetcomments = getcomments($friendid, "profile", $myid);
 $commentcount = $arraygetcomments[0];
 $pagecomments = $arraygetcomments[1];
 $strSQL1 = "SELECT * FROM users WHERE friends LIKE '%{$friendid}%' ";
 $rs = mysql_query($strSQL1) or die(mysql_error());
 $followercount = mysql_num_rows($rs);
 $unfollowbutton = "\n\t\t\t<!-- unfollow button -->\n\t\t\t\t<div name='unfollowbutton' tabindex='0' id='unfollow_" . $friendid . "' class='btn btn-success navbarbutton' onclick='unfollow(this.id)' onkeyup='if (event.keyCode == 32) document.getElementById(&#39;unfollow_" . $friendid . "&#39;).click()' title='unfollow this user'>\n\t\t\t\t\t<span class='glyphicon glyphicon-heart divbuttonglyph' style='padding-right: 3px' aria-hidden='false'></span>\n\t\t\t\t\t<span class='badge'>" . $followercount . "</span>\n\t\t\t\t</div>\n\t\t\t";
 //---tips---//
 if (isset($_SESSION["jumblies"]) and isset($_SESSION["tip"])) {
     include "tips.php";
     $_SESSION["tip"] = updatetips("follow", $_SESSION["tip"], $myid);
     $helppane = displaytip("profile", $myid);
 } else {
     $helppane = "";
 }
 echo $unfollowbutton . ":|:|:|:" . $wavescount . ":|:|:|:" . $commentcount . ":|:|:|:" . $pagecomments . ":|:|:|:" . $helppane;
Пример #13
0
    if (trim($_REQUEST['message']) !== "") {
        //Запись
    } elseif ($commentsid > 0) {
        if ($del > 0) {
            dellcomments(0, $commentsid, $commentFile);
            header('LOCATION: ../admin/comments.php' . $editpage);
        }
        if ($moder > -1) {
            modercomments(0, $commentsid, $commentFile, $moder);
            header('LOCATION: ../admin/comments.php' . $editpage);
        }
        if ($edit > 0) {
        }
    }
    @($contentcenter .= "<table cellpadding=\"2\" cellspacing=\"0\" width=\"90%\"><h3>Комментарии к новости</h3><br /><br />");
    $arrcomments = getcomments(0, $commentFile);
    for ($i = 0; $i < count($arrcomments); $i++) {
        $currentcomment = $arrcomments[$i];
        $contentcenter .= '<tr><td  width="50%" colspan="1"><b>Автор:</b> ' . $currentcomment['name'] . '  <b>ip:</b>[<a href="../admin/banip.php?add=' . $currentcomment['ip'] . '" title="Бан по ip адресу">' . $currentcomment['ip'] . '</a>]<br/>';
        $contentcenter .= '<b>E-mail:</b>  <a href="mailto:' . $currentcomment['email'] . '">' . $currentcomment['email'] . '</a></td>';
        $contentcenter .= '<td  width="30%" colspan="1">' . date("r", $currentcomment['id_comment']) . '</td>';
        $contentcenter .= '<td width="15%" colspan="1">Модерация: <a title="Модерация" href="../admin/comments.php' . $editpage . '&commentsid=' . $currentcomment['id_comment'];
        if ($currentcomment['moderator'] == 1) {
            $contentcenter .= '&moder=0"><img src="images/cb_y.png" /></a></td>';
        } else {
            $contentcenter .= '&moder=1"><img src="images/cb_e.png" /></a></td>';
        }
        $contentcenter .= '<td width="5%" colspan="1"><a title="Удалить комментарий" href="../admin/comments.php' . $editpage . '&commentsid=' . $currentcomment['id_comment'] . '&del=1"><img src="images/delete.png" /></a></td></tr>';
        $contentcenter .= '<tr><td class="line3" colspan="4">' . $currentcomment['content'] . "</td></tr>";
    }
}
Пример #14
0
			<br /><br /><a href=\'javascript:history.back(1)\'><B>Вернуться назад</B></a>';
        }
        //Комментарии
    } elseif ($newsid > 0) {
        if ($commentsid > 0) {
            if ($del > 0) {
                dellcomments($newsid, $commentsid, $commentFile);
                header('LOCATION: ../admin/news.php?newsid=' . $newsid);
            }
            if ($moder > -1) {
                modercomments($newsid, $commentsid, $commentFile, $moder);
                header('LOCATION: ../admin/news.php?newsid=' . $newsid);
            }
        }
        @($contentcenter .= '<table cellpadding="2" cellspacing="0" width="90%"><h3>Комментарии к новости</h3><br /><br />');
        $arrcomments = getcomments($newsid, $commentFile);
        for ($i = 0; $i < count($arrcomments); $i++) {
            $currentcomment = $arrcomments[$i];
            $contentcenter .= '<tr><td  width="80%" colspan="1"><b>Автор:</b> ' . $currentcomment['name'] . '  <b>ip:</b>[<a href="../admin/banip.php?add=' . $currentcomment['ip'] . '" title="Бан по ip адресу">' . $currentcomment['ip'] . '</a>]<br/>';
            $contentcenter .= '<b>E-mail:</b>  <a href="mailto:' . $currentcomment['email'] . '">' . $currentcomment['email'] . '</a></td>';
            $contentcenter .= '<td width="15%" colspan="1">Модерация: <a title="Модерация" href="../admin/news.php?newsid=' . $newsid . '&commentsid=' . $currentcomment['id_comment'];
            if ($currentcomment['moderator'] == 1) {
                $contentcenter .= '&moder=0"><img src="images/cb_y.png" /></a></td>';
            } else {
                $contentcenter .= '&moder=1"><img src="images/cb_e.png" /></a></td>';
            }
            $contentcenter .= '<td width="5%" colspan="1"><a title="Удалить комментарий" href="../admin/news.php?newsid=' . $newsid . '&commentsid=' . $currentcomment['id_comment'] . '&del=1"><img src="images/delete.png" /></a></td></tr>';
            $contentcenter .= '<tr><td class="line3" colspan="3">' . $currentcomment['content'] . "</td></tr>";
        }
        $contentcenter .= '<tr><td><center><a href=\'javascript:history.back(1)\'><B>Вернуться назад</B></a></center></td></tr>';
        //Редактирование
Пример #15
0

              <!-- comment section --> 
              <div id = "commentlist"> 
                <!-- area to write comments--> 
                <div id = "postcomment">
                  <p> What do you think? Write a commment</p>
                  <textarea class="input-lg col-xs-12 col-sm-12 col-md-12" id="commenttext" type="text" name="search" rows="2" > </textarea>
                  <button id="post" type="button" class="btn btn-info">Post Comment <span class="glyphicon glyphicon-comment"></span>
                  </button>
                  <p id="alert-comment" class="bg-danger" style = "display:none;"><br>you need to Sign in before you post a comment<br><br></p>
                </div>

                <div id = "commentpart">
                  <?php 
$comments = getcomments(20, $_GET['watch']);
while ($commentrow = pg_fetch_array($comments)) {
    ?>
                      <div class="comment">
                        <h5><b><?php 
    echo htmlspecialchars($commentrow['username']);
    ?>
 Says:</b></h5>
                        <p style="text-indent:40px;text-align:justify"><?php 
    echo htmlspecialchars($commentrow['coment']);
    ?>
</p>
                      </div>
                    <?php 
}
//end of while
Пример #16
0
function run()
{
    global $dbh;
    $query = $dbh->prepare("select accounts.id, accounts.type, accounts.data1, accounts.data2, accounts.data3 from accounts where active = 1");
    $query->execute(array());
    $accounts = $query->fetchAll();
    $comments = array();
    foreach ($accounts as $account) {
        $c = getcomments($account['id']);
        $comments = array_merge($comments, $c);
    }
    foreach ($comments as $comment) {
        $query = $dbh->prepare("insert ignore into inbox (accountid,id,type,user_name,user_description,user_avatar,user_handle,message,time) values (?,?,?,?,?,?,?,?,?)");
        $query->execute(array($comment['accountid'], $comment['id'], $comment['type'], $comment['user_name'], $comment['user_description'], $comment['user_avatar'], $comment['user_handle'], $comment['message'], $comment['time']));
    }
}