public function actionLove() { $record = ManyCategoryUser::model()->deleteAll(array('user_id' => User()->id)); $nodes = $_POST['nodes']; foreach ($nodes as $node) { $rel = new ManyCategoryUser(); $rel->category_id = $node; $rel->user_id = User()->id; $rel->save(); } $this->redirect(rurl()); }
<ul> <?php $u = rurl(); $menu_items = array(array($u, 'HOME'), array($u . '/about.php', 'ETHICS'), array($u . '/members.php', 'MEMBERS'), array($u . '/gallery/', 'GALLERY'), array($u . '/contact.php', 'CONTACT')); if (!empty($arrUser) && $arrUser['type'] == 'admin') { array_push($menu_items, array($u . '/admin', 'ADMIN')); } if (!empty($arrUser) && $arrUser['idEditor'] == $arrUser['idUser']) { array_push($menu_items, array($u . '/edit', 'MyPOSTS')); } $I_am_at = explode('?', "http://{$_SERVER['HTTP_HOST']}{$_SERVER['REQUEST_URI']}"); foreach ($menu_items as $item) { if ($I_am_at[0] == $item[0] || $I_am_at[0] == $item[0] . '/') { echo "<li class=\"select\"><a href=\"{$item['0']}\">{$item['1']}</a></li>"; } else { echo "<li><a href=\"{$item['0']}\">{$item['1']}</a></li>"; } } ?> </ul>
<ul> <?php $u = rurl() . '/admin/'; $menu_items = array(array($u, 'ADMIN ZONE'), array($u . 'post-manager.php', 'POSTS'), array($u . 'user-manager.php', 'USERS'), array(rurl(), ' →HOME')); $I_am_at = explode('?', "http://{$_SERVER['HTTP_HOST']}{$_SERVER['REQUEST_URI']}"); foreach ($menu_items as $item) { if ($I_am_at[0] == $item[0] || $I_am_at[0] == $item[0] . '/') { echo "<li class=\"select\"><a href=\"{$item['0']}\">{$item['1']}</a></li>"; } else { echo "<li><a href=\"{$item['0']}\">{$item['1']}</a></li>"; } } ?> </ul>
function populate_db_manual($db, $sqlfile = 'administrator/backups/database-sql.sql') { global $qstr, $_CONFIG; $extra_que = $qstr[0]; $file = $sqlfile; define('DATA_CHUNK_LENGTH', 16384); // How many chars are read per time define('MAX_QUERY_LINES', 300); // How many lines may be considered to be one query (except text lines) $lines = ""; $error = ""; $error_status = 0; if (isset($_REQUEST['chunk']) && (int) $_REQUEST['chunk'] != 0) { $chunk = $_REQUEST['chunk']; } else { $chunk = DATA_CHUNK_LENGTH; } if ($_REQUEST['correct_query'] != 1) { $start_pos = (int) $_REQUEST['fpos']; $fpos = read_file($file, MAX_QUERY_LINES, $start_pos, $chunk, $lines); } else { $lines[0] = stripslashes($_REQUEST['error_msg']); $fpos = $_REQUEST['start_posf']; } foreach ($lines as $line) { if (trim($line) != '') { $query = $line; $line = $line . ";\n"; #$tmp = explode("DEFAULT CHARSET",$line); $line_tmp = $line; $start_pos = $start_pos + strlen($line); if (isset($_REQUEST['strrep'])) { $strrep = explode("\r\n", stripslashes($_REQUEST['strrep'])); foreach ($strrep as $value) { if (trim($value) != "") { $tmp = explode("|", $value); $line_tmp = str_replace(trim($tmp[0]), trim($tmp[1]), $line_tmp); $query = str_replace(trim($tmp[0]), trim($tmp[1]), $query); } } } if (!$_CONFIG['mysqli']->query($line_tmp)) { if ($_REQUEST['correct_query'] != 1) { $fpos = $start_pos; } $form_url = rurl($fpos, $chunk); echo "</form><form name='' action='" . $form_url . "' method='POST'>\r\n\r\n\t <input type='hidden' name='correct_query' value = '1'>\r\n\r\n\t <input type='hidden' name='start_pos' value='" . ($start_pos - strlen($line)) . "'>\r\n\r\n\t <input type='hidden' name='start_posf' value='" . $fpos . "'>\r\n\r\n\t <input type='hidden' name='glen' value='" . $qlen . "'>\r\n\r\n\t <center>"; echo sprintf("<b>###MYSQL error</b>\n<br /><font color='red'>" . $_CONFIG['mysqli']->error . "</font><br />\n<b>###On Query:</b><br />\n<br /><textarea cols=70 rows=15 name='error_msg'>%s</textarea><br />", $query); echo "<b>Search and replace in query:</b><br /><textarea cols=70 rows=5 name='strrep'>" . stripslashes($_REQUEST[strrep]) . "</textarea><br />\r\n\r\n\t <small>\r\n\r\n\t enter a string, one per line, which you would like to replace in the query above, example <i>string_to_search|text_to_replace_with</i>\r\n\r\n\t </small>"; echo "<br /> <input type=submit name=submit value='Correct Query >>'>"; echo "</center></form>"; $error_status = 1; break; } } } $percent = sprintf("%.2f", 100 * $fpos / filesize($file)); if ($fpos != '-1') { echo "<h3>Processed {$percent}% from sql backup!</h3>"; $red_url = rurl($fpos, $chunk); if ($error_status == 1) { echo "<h3><a href='" . $red_url . "'>To skip this query, click here to Continue</a></h3>"; exit; } else { echo "<h3><a href='" . $red_url . "'>Continue here</a></h3>"; echo "<script>window.location='" . $red_url . "'</script>"; exit; } } else { echo "<h3>The sql import is finished!</h3>"; } return; }
} // VIEW GALLERY if (!empty($m_picasaUser)) { ?> <div class="msg" style="clear: right;"> <a href="<?php echo rurl(); ?> /gallery/<?php echo $m_idUser . '/' . $m_username; ?> " title="<?php echo "{$m_usernames} gallery"; ?> ">pictures <img class="msg" src="<?php echo rurl() . '/images/gallery.png'; ?> "/> </a> </div> <?php } ?> <h2><?php echo '<a href="' . $m_info_url . '" title="' . $m_usernames . ' info">' . $m_username . '</a>'; ?> </h2> <p class="from"><?php echo $m_country;
function url_flag($size = 24, $color = "red") { /* Get the URL for the flags icon Andreas made * Accepts 'red', 'blue' and gray color strings. */ return rurl() . '/images/sauer/' . $color . 'flag' . $size . '.png'; }
} /* END OLD PASWORD PATCH */ // Mount the user array (or false) if ($arrUser = isUser($username_form, $password, $dbConn)) { if (empty($error)) { // $error means user is in limbo (Panda check this. Could it be from other reasons?) // and update last seen users (date_modify) $d = date("Y-m-d H:i:s"); $query = "UPDATE users SET date_modified = '{$d}' WHERE idUser = {$arrUser['idUser']}"; $result = mysql_query($query, $dbConn); // SESSION init $_SESSION['NC_user'] = $arrUser['username']; $_SESSION['NC_password'] = $arrUser['pass']; //$_SESSION['CSRF']=substr(md5(uniqid(rand( ), true)), 10, 15); // Location is the actual page except, obvioulsy, for the register page if (preg_match("/register.php/i", $_SERVER['REQUEST_URI'])) { $location = rurl(); } else { $location = rurl() . $_SERVER['REQUEST_URI']; } header("Location: {$location}"); die; } else { $arrUser = false; } } elseif (empty($error['limbo'])) { $error['userpass'] = '******'; } }
require_once '../admin/functions.php'; require_once rdir() . '/admin/connect.php'; require_once rdir() . '/admin/isUser.php'; // db connection $dbConn = connect_db(); if (!empty($_SESSION['NC_user']) && !empty($_SESSION['NC_password'])) { $arrUser = isUser($_SESSION['NC_user'], $_SESSION['NC_password'], $dbConn); } // Number of comments to show $n = 10; if (empty($arrUser) || !empty($arrUser) && $arrUser['type'] == 'user') { // Get the Last Comments of public posts posts. $q = "SELECT idComment, comments.userId, postId, content, comments.date, username, title FROM comments INNER JOIN posts ON postId = idPost INNER JOIN users ON comments.userId = users.idUser WHERE posts.postFor = 'all' ORDER BY comments.date DESC LIMIT 0,{$n}"; } else { // Members, friends and admins can see all... $q = "SELECT idComment, comments.userId, postId, content, comments.date, username, title FROM comments INNER JOIN posts ON postId = idPost INNER JOIN users ON comments.userId = users.idUser ORDER BY comments.date DESC LIMIT 0,{$n}"; } if ($r = mysql_query($q, $dbConn)) { while ($commentrow = mysql_fetch_array($r)) { extract(strip_slashes_arr($commentrow), EXTR_PREFIX_ALL, "lastc"); $lastc_pic = get_user_pic($lastc_userId, 24); $lastc_title = '<a href="' . rurl() . '/post/' . $lastc_postId . '/' . friendly_str($lastc_title) . '">' . $lastc_title . '</a>'; $lastc_content = cut_string($lastc_content, 60); $lastc_content = '<a class="acomm" href="' . rurl() . '/post/' . $lastc_postId . '/' . friendly_str($lastc_title) . '#comm_' . $lastc_idComment . '">' . $lastc_content . '</a>'; echo '<div class="comment">'; echo '<p><img class="userpic" src="' . $lastc_pic . '" alt="' . $lastc_username . '" title="' . $lastc_username . '"/>'; echo '<strong>' . ' ' . $lastc_username . '</strong>, on ' . $lastc_title . ' says: '; echo '<em>' . $lastc_content . '</em></p>'; echo '</div>'; } }
// show message subject if ($is_read == '0') { echo '<td class="subject"><a style="font-weight: bold;" href="messages/read.php?msg=' . $idMessage . '">' . $subject . '</a></td>'; } else { echo '<td class="subject"><a href="messages/read.php?msg=' . $idMessage . '">' . $subject . '</a></td>'; } // show if it is a new message if ($is_read == '0') { $flag = get_the_flag(24, 'blue'); } else { $flag = $flag = get_the_flag(24, 'gray'); } echo '<td style="text-align: center;">' . $flag . '</td>'; // show delete icon echo '<td style="text-align: center;"><a href="messages/index.php?del=' . $idMessage . ' title="Shred message" onclick="return confirm(\'Remove message?\');"> <img src="' . rurl() . '/images/delete.png" alt="[X]"/></a></td></tr>'; $i++; } // end while mysql_fetch_array echo "</table>"; } else { echo "You have no messages."; } } else { echo "Bad db connection."; } } else { // or user is not logged in. echo 'Sorry: You need to be logged in to read messages.'; } ?>
<?php // Our logout, also known as `the session destroyer`. session_unset(); session_destroy(); $location = rurl(); header("Location: {$location}"); die;
<p> <a href="<?php echo rurl() . '/gallery/'; ?> " title="back to the gallery index">Back to the Gallery Index</a> </p> <h1 style="text-align: center"><?php echo get_the_flag(24, "blue") . ' ·NC· ' . $username . ' ' . get_the_flag(24, "red"); ?> </h1> <div class="picasa"> <div id="member_pics"></div> </div> <p style="text-align: center"> <a href="<?php echo rurl() . '/gallery/'; ?> " title="back to the gallery index"> Back to the Gallery Index<br/><br/><?php echo get_the_flag(24, 'blue'); ?> </a> </p> <?php } ?> </div><!-- /main --> </div><!-- /content--> <div id="footer"><?php include rdir() . '/includes/footer.inc.php';
// STORE TEMPORAL USERDATA AND SEND A VALIDATION CODE if (empty($error)) { // GET A VALIDATION CODE $code = get_random_string() . time() . get_random_string(); // INSERT ON PREUSERS $query = "INSERT INTO preusers (username, pass, email, first_name, last_name, country, homepage, code) VALUES ('{$reg_username}', '{$reg_pass}', '{$reg_email}', '{$reg_first_name}', '{$reg_last_name}', '{$reg_country}', '{$reg_homepage}', '{$code}')"; $result = mysql_query($query, $dbConn); unset($query, $result); // SEND A MAIL WITH THE VALIDATION URL $to = strip_tags($reg_email); $subject = "No Clan: Complete your registration process"; $link = rurl() . '/register.php?actCode=' . $code; $nc = rurl(); $body = trim("Hi {$reg_username}!<br/>\n\n\t\t\t\t\tTo complete your registration process at No Clan site \n\t\t\t\t\tyou have to activate your account by clicking the following link:<br/>\n\n\t\t\t\t\t<a href='{$link}'>{$link}</a><br/>\n\n\t\t\t\t\t<br/>\n\n\t\t\t\t\t(or copy&paste the url on your browser)<br/>\n<br/>\n\n\t\t\t\t\tAnd please, know that <strong>registration at our site does not mean you are a clan member or that you may use -NC- tag to play.</strong><br/>\n<br/>\n\n\t\t\t\t\tThank you for your registration.<br/>\n\n\t\t\t\t\tNo Clan - <a href='{$nc}'>{$nc}</a><br/>\n<br/>\n"); if (send_mail($to, $subject, $body)) { $location = rurl() . '/register.php?code=sent'; header("Location: {$location}"); } else { $error['send_mail'] = 'There was a problem on the validation email process. Did you sent a valid email?'; } } } // page info $page_title = "NoClan: Registration"; // used at 'includes/head.inc' ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <?php
?> <input name="submitPreview" type="submit" value="PREVIEW" /> <input name="idPost" type="hidden" value="<?php canput($idPost); ?> " /> <input class="submit" name="submitEdit" type="submit" value="SAVE" onclick="return confirm('After edition, this post will go back to it\'s owner.\n\nCONFIRM EDITION');"/> <?php } ?> </form> <?php if ($arrUser['type'] == 'admin') { $location = rurl() . '/admin/'; } else { $location = rurl() . '/edit/'; } ?> <button style="float: right; margin-top: -3.3em;" onclick="location.href='<?php echo $location; ?> '">CANCEL</button> <!-- /ADD&EDIT FORM --> </div><!-- /main --> </div><!-- /content--> <div id="footer"></div> <!-- /footer -->
?> <!-- /Fancy --> <!-- timers & auto-updates --> <script language="javascript" type="text/javascript" src="/js/ajax-general.js"></script> <!-- /timers & auto-updates --> <!-- ANALYTICS --> <script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-27511799-1']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); </script> <!-- /ANALYTICS --> <!-- RSS --> <link rel="alternate" title="No Clan: News" href="<?php echo rurl() . '/rss/news.php'; ?> " type="application/rss+xml"/> <!-- /RSS --> <!-- G+ --> <script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script> <!-- /being social -->
<?php session_start(); require_once '../admin/functions.php'; require_once rdir() . '/admin/config.php'; require_once rdir() . '/admin/connect.php'; require_once rdir() . '/admin/isUser.php'; // db connection $dbConn = connect_db(); // Is user connected? Is admin? no? go home then. if (!empty($_SESSION['NC_user']) && !empty($_SESSION['NC_password'])) { $arrUser = isUser($_SESSION['NC_user'], $_SESSION['NC_password'], $dbConn); } else { go_home(); } $idUser = $arrUser['idUser']; $q = "SELECT idMessage FROM messages WHERE messages.to='{$idUser}' AND is_read='0'"; $r = mysql_query($q, $dbConn); $messages = mysql_num_rows($r); echo '<p><a href="' . rurl() . '/messages/">Messages (' . $messages . ')</a> • <a href="' . rurl() . '/messages/full_message.php">Send a message</a></p>';
public function actionBatch() { if (Yii::app()->request->isPostRequest) { $type = $_POST['type']; $ids =& $_POST['ids']; if (count($ids) > 0 && ($type == "删除" || $type == "delete")) { foreach ($ids as $id) { $imodel = new $this->controllerId(); $item = $imodel->findByPk($id); $item->delete(); } $str = '已删除 ' . count($ids) . ' 个用户数据 ' . Time::now(); } elseif (count($ids) > 0 && ($type == "复制" || $type == "copy")) { foreach ($ids as $id) { $at = Article::model()->findByPk($id); $new = new Article(); $new->attributes = $at->attributes; unset($new->attributes['id']); $new->title = $new->title . ' - copy'; $new->save(); } $str = '已复制 ' . count($ids) . ' 个用户数据 ' . Time::now(); } elseif (count($ids) > 0 && ($type == "重点" || $type == "star")) { $count =& count($ids); $ids = join(',', $ids); Article::model()->updateAll(array('is_star' => 1), " FIND_IN_SET(id,:ids) ", array(':ids' => $ids)); $str = '已打重点 ' . $count . ' 个用户数据 ' . Time::now(); } elseif (count($ids) > 0 && ($type == "非重点" || $type == "unstar")) { $count =& count($ids); $ids = join(',', $ids); Article::model()->updateAll(array('is_star' => 0), " FIND_IN_SET(id,:ids) ", array(':ids' => $ids)); $str = '已取消重点 ' . $count . ' 个用户数据 ' . Time::now(); } Yii::app()->user->setFlash('success', $str); $this->redirect(rurl()); } else { throw new CHttpException(400, 'Invalid request. Please do not repeat this request again.'); } }
} ?> </div> <?php } ?> <!-- /errors --> <div class="pic128"> <?php if (!empty($_GET['uploaded']) && empty($error)) { ?> <div id="previewArea"></div> <?php } else { $userPage = rurl() . '/user/' . $username . '/'; ?> <a href="<?php echo $userPage; ?> " title="<?php echo $username; ?> 's info page"><img src="<?php echo get_user_pic($idUser, 128); ?> "/></a> <?php } ?> </div>
/** * Deletes a particular model. * If deletion is successful, the browser will be redirected to the 'index' page. */ public function actionBatch() { if (Yii::app()->request->isPostRequest) { $type = $_POST['type']; if (count($_POST['ids']) > 0 && ($type == "删除" || ($type = 'delete'))) { $ids =& $_POST['ids']; foreach ($ids as $id) { $imodel = new $this->controllerId(); $item = $imodel->findByPk($id); $item->delete(); } $str = '已删除 ' . count($ids) . ' 个用户数据 ' . Time::now(); Yii::app()->user->setFlash('success', $str); } $this->redirect(rurl()); } else { throw new CHttpException(400, 'Invalid request. Please do not repeat this request again.'); } }
// no error checking, but do we really have to? $username_query = "SELECT username, idUser FROM users WHERE\n\t idUser='******' LIMIT 1"; $r3 = mysql_query($username_query, $dbConn); $usernameArr = mysql_fetch_array($r3); $username = $usernameArr['username']; // show sender's photo echo '<div class ="header">'; echo '<img class="userpic" src="' . $img . '" alt="' . $username . '" title="' . $username . '"/>'; echo "<p>from</p>"; echo "<h2>{$username}</h2>"; echo "<p>On {$time}</p>"; echo '</div>'; echo '<div class ="body">'; echo "<p><strong>Subject:</strong> {$subject}</p>"; echo "<p>{$message}</p>"; $rurl = rurl(); echo '<a class="fancy_mini_main" style="float: right;" href="' . $rurl . '/messages/message.php?reply=' . $idMessage . '" title="Reply to ' . $username . '">Reply</a>'; echo '</div>'; } ?> </div> </div><!-- /main --> </div><!-- /content--> <div id="footer"> </div> <!-- /footer --> </div><!-- /container --> </div><!-- /wrapper -->
echo $arrUser['country']; ?> </p> <p><?php if ($arrUser['type'] == 'member' || $arrUser['type'] == 'admin') { echo "<strong>•NC• </strong>"; } ?> since <?php echo $arrUser['date_created']; ?> </p> </div> <?php if ($arrUser['type'] == 'member' || $arrUser['type'] == 'admin') { ?> <div style="text-align: center; padding: 5px; background: url('<?php echo rurl() . '/css/art/black10.png'; ?> '); margin-top: 3px;"> <div id="messages"><!-- Filled and auto-updated using ajax. --></div> </div> <?php } ?> </div> <?php }
<?php /* LINKS * use Title, url and blue/red for internal/external link */ $links = array(array('F.A.Q.', rurl() . '/faq.php', 'blue'), array('Member rules', rurl() . '/post/156/decisions-are-made', 'blue'), array('Crosshairs', rurl() . '/post/161/crosshairs', 'blue'), array('Hints & tips', rurl() . '/hints-tips.php', 'blue'), array('HUD stats', rurl() . '/post/149/stats-inside-your-hud-script', 'blue'), array('Nooblounge <3', 'http://www.nooblounge.net/', 'red'), array('Cube 2: Sauerbraten', 'http://sauerbraten.org/', 'red'), array('Sauerbraten World League', 'http://swl-cube2.org/', 'red')); ?> <div id="links"> <h3>Links</h3> <div> <ul> <?php foreach ($links as $l) { // if it's not locally hosted, open in a new window if ($l[2] == 'blue') { echo '<li><a href="' . $l[1] . '" title = "' . $l[0] . '">' . get_the_flag(24, $l[2]) . ' <span>' . $l[0] . '</span></a></li>'; } if ($l[2] == 'red') { echo '<li><a target="_blank" href="' . $l[1] . '" title = "' . $l[0] . '">' . get_the_flag(24, $l[2]) . ' <span>' . $l[0] . '</span></a></li>'; } } ?> </ul> </div> </div>
<div class="social" style="padding-bottom: 0.5em; height: 21px;"> <div class="gPlus" style="float: left;"> <g:plusone size="medium" href="<?php echo rurl(); ?> "></g:plusone> </div> <div class="fBook" style="height: 24px; float: right; width: 105px;"> <iframe src="//www.facebook.com/plugins/like.php?href=<?php echo urlencode(rurl()); ?> &send=false&layout=button_count&width=450&show_faces=false&action=like&colorscheme=light&font&height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden;" allowTransparency="true"></iframe> </div> </div>
<?php /* ADMIN LINKS * use Title, url and blue/red for internal/external link */ $links = array(array('Backup database', rurl() . '/admin/backup.php', 'blue')); ?> <div id="links"> <h3>Links</h3> <div> <ul> <?php foreach ($links as $l) { echo '<li><a href="' . $l[1] . '" title = "' . $l[0] . '">' . get_the_flag(24, $l[2]) . ' ' . $l[0] . '</a></li>'; } ?> </ul> </div> </div>
$email = $row['email']; } else { $error['nouser'] = '******'t belong to a registered user.'; } } else { $error['mysql'] = 'Bad database connection.'; } if (empty($error)) { // mysql fields to complete are id, time, email, resetcode $code = get_random_string() . time() . get_random_string(); $q = "INSERT INTO pass_reset values (NULL, CURRENT_TIMESTAMP, '{$email}', '{$code}')"; if ($r = mysql_query($q, $dbConn)) { $to = strip_tags($email); $subject = "No Clan: Password reset request"; $link = rurl() . htmlentities($_SERVER['PHP_SELF']) . '?resetCode=' . $code; $nc = rurl(); $body = trim("Hi {$username}!<br/>\n\n\t\t\t\t\t\tYou seem to have forgotten your account's details.\n\t\t\t\t\t\tYour registered username is: {$username}<br />\n\n\t\t\t\t\t\tTo select a new password, you have to follow this link:<br />\n\n\t\t\t\t\t\t<a href='{$link}'>{$link}</a><br />\n\n\t\t\t\t\t\t<br />\n\n\t\t\t\t\t\t(or copy&paste the url on your browser)<br />\n\n\t\t\t\t\t\tPlease take note that this code is temporary and\n\t\t\t\t\t\tonly lasts for 3 hours. After this period, you will\n\t\t\t\t\t\thave to request a new password reset.<br />\n\n\t\t\t\t\t\t<br />\n\n\t\t\t\t\t\tIf you didn't request a password reset and you\n\t\t\t\t\t\twant to keep your current password, you may ignore\n\t\t\t\t\t\tthis email.<br />\n\n\t\t\t\t\t\t<br />\n\n\t\t\t\t\t\tSee you soon.<br/>\n\n\t\t\t\t\t\tNo Clan - <a href='{$nc}'>{$nc}</a><br/>\n<br/>\n"); if (send_mail($to, $subject, $body)) { // Finish all $request = 'sent'; } else { $error['bademail'] = 'We are sorry, we couldn\'t send the email. Please contact the administration.'; } } else { $error['mysql'] = 'Request failed. Have you already requested a password reset?'; } } } // STEP 2. they followed the link in their email if (!empty($_GET['resetCode'])) { $code = mysql_real_escape_string($_GET['resetCode'], $dbConn);
<?php $fred = rurl() . '/images/dott/ed.gif'; $bernard = rurl() . '/images/dott/bernard.gif'; $gt = rurl() . '/images/dott/gt.gif'; $hoagie = rurl() . '/images/dott/hoagie.gif'; $laverne = rurl() . '/images/dott/laverne.gif'; $laverne2 = rurl() . '/images/dott/laverne2.gif'; $pt = rurl() . '/images/dott/pt.gif'; $pt2 = rurl() . '/images/dott/pt2.gif'; $quotes = array("<img src=\"{$pt}\" alt='Purple Tentacle'><br/>I feel like I could... like I could... like I could... TAKE ON THE WORLD!!", "<img src=\"{$fred}\" alt='Dr.Fred'><br/>Soon we'll all be speaking... Well, English I guess.", "<img src=\"{$fred}\" alt='Dr.Fred'><br/>Get me out of here! I feel like I'm pupating!", "<img src=\"{$fred}\" alt='Dr.Fred'><br/>Cheap-Mail-Ordered Jewel! I'd knew I should've bought a real diamond.", "<img src=\"{$fred}\" alt='Dr.Fred'><br/>Step one. Find plans. Step two. Save world. Step three. Get out of my house! Let's get cracking.", "<img src=\"{$hoagie}\" alt='Hoagie'/><br/>We may not live to see yesterday...", "<img src=\"{$hoagie}\" alt='Hoagie'/><br/>Bernard, float over here so I can punch you. ", "<img src=\"{$hoagie}\" alt='Hoagie'/><br/>Dude! You're, like, George Washington, man!", "<img src=\"{$bernard}\" alt='Bernard'/><br/>You know what they say: \"To save the world, you have to push a few old ladies down the stairs.\"", "<img src=\"{$bernard}\" alt='Bernard'/><br/>Boy, I haven't seen you since I was here five years ago. You know, I bet you'd really like my friend Hoagie. He's a roadie for a heavy metal band. You could hit him over the head with a bowling ball and it wouldn't faze him. He can pass out standing up and not drop anything.\" (pause) \"The two of you have a lot in common.", "<img src=\"{$bernard}\" alt='Bernard'/><br/>Boy, I wish I had as little on my mind as you do. No offense intended, of course.", "<img src=\"{$laverne}\" alt='Laverne'/><br/>This must be that Woodstock place Mom and Dad always talk about.", "<img src=\"{$laverne}\" alt='Laverne'/><br/>Gosh, I hope this isn't like the primitive, dangerous microwave ovens of my century. Those things could really pop a hamster good.", "<img src=\"{$bernard}\" alt='Bernard'/><br/>Bernard: I'm sure Dr. Fred wouldn't do this if it weren't safe!<br/><img src=\"{$laverne}\" alt='Laverne'/><br/>After all, he IS a doctor.", "<img src=\"{$laverne}\" alt='Laverne'/><br/>This is all your fault, Bernard.<br/><img src=\"{$fred}\" alt='Dr.Fred'/><br/>Behold, children! The Chron-O-John!<br/><img src=\"{$hoagie}\" alt='Hoagie'/><br/>Doc, can't you just send Bernard?<br/><img src=\"{$fred}\" alt='Dr.Fred'/><br/>No, you must all go to increase the odds that one of you will make it there alive.<br/><img src=\"{$bernard}\" alt='Bernard'/><br/>Has anyone ever been hurt in this thing?<br/><img src=\"{$fred}\" alt='Dr.Fred'/><br/>Of course not!<br/>This is the first time I've ever tried it on people.", "<img src=\"{$fred}\" alt='Dr.Fred'/><br/>Leaping labrats!<br/><img src=\"{$bernard}\" alt='Bernard'/><br/>Dr. Fred!<br/><img src=\"{$fred}\" alt='Dr.Fred'/><br/>What have you done this time, you meddling milquetoast? Now Purple Tentacle is free to use his evil mutant powers to take over the world, and ENSLAVE ALL HUMANITY!<br/><img src=\"{$bernard}\" alt='Bernard'/><br/>Whoops.", "Is that a W-390/B Frivolous Spending Report?<br/><br/>No, it's another 561-AB Negative Attention Statement.", "<img src=\"{$bernard}\" alt='Bernard'/><br/>Look behind you, a three-headed monkey!<br/><img src=\"{$pt}\" alt='Purple Tentacle'/><br/>The only three-headed monkey here is in FRONT of us.", "<img src=\"{$bernard}\" alt='Bernard'/><br/>Look behind you, a three-headed monkey!<br/>", "<img src=\"{$pt}\" alt='Purple Tentacle'/><br/>The only three-headed monkey here is in FRONT of us.", "<img src=\"{$fred}\" alt='Dr.Fred'/>", "<img src=\"{$bernard}\" alt='Bernard'/>", "<img src=\"{$gt}\" alt='Green Tentacle'/>", "<img src=\"{$hoagie}\" alt='Hoagie'/>", "<img src=\"{$laverne}\" alt='Laverne'/>", "<img src=\"{$laverne2}\" alt='Laverne'/>", "<img src=\"{$pt}\" alt='Purple Tentacle'/>", "<img src=\"{$pt}\" alt='Purple Tentacle'/>"); ?> <div style="margin: 2965px 0 215px 0;"> <p style="font: 32px 'Gochi Hand', cursive; padding: 3em; text-align: center; color: white;"><em><?php echo $quotes[rand(0, 27)]; ?> </em></p> </div>
echo $image; ?> "/> <p style="font-size: 0.8em; color: #801010; border: dotted 1px #555; padding: 2px; margin-top: 1px;"><?php echo rurl() . "/data/images/posts/" . $dirImgs . '/' . pathinfo($image, 2); ?> </p> </div> <?php } } ?> <h3> <a class="fancy_big_frame" href="<?php echo rurl() . '/admin/image-manager.php?dirImgs=' . $dirImgs . '&imgs=' . $imgs; ?> "> [Image Manager] </a> </h3> <!--/IMAGES --> </div><!-- /"sidepanel" --> <div id="main"> <h1>NC Post Manager (<?php if (empty($_GET['idPost'])) { echo "add mode"; } else {
} ?> </table> <h2>Published</h2> <?php if (empty($arrPublished)) { echo '<p>No published post yet</p>'; } else { ?> <table style="width: 100%;"> <?php $i = 0; foreach ($arrPublished as $p) { $title = $p['title']; $link = rurl() . '/post/' . $p['idPost'] . '/' . friendly_str($p['title']); $date = $p['date_pub']; $comms = $p['n_comm'] . ' comments'; $extract = cut_string($p['summary'], 25); ?> <tr <?php if ($i % 2 == 0) { echo 'class="i"'; } ?> style="padding: 0;"> <td style="width: 6em;"><?php echo $date; ?> </td> <td style="padding-right: 1em;">
" target="_blank"><?php echo $homepage; ?> </a> </p> </div> <div id="userAbout"> <h2>About <?php echo $username; ?> <?php if (isset($arrUser) && $idUser == $arrUser['idUser']) { ?> <span class="label"><a href="<?php echo rurl(); ?> /user-settings.php">[edit my info]</a></span> <?php } ?> </h2> <div class="darkfield"> <?php echo $about; ?> </div> </div> <br/>
public function actionLovem() { $users = $_POST['users']; $love_users = $_POST['love_users']; $accept_list = implode(',', $users); $c = new CDbCriteria(); $c->condition = 'find_in_set(accept_id, :accept_id) AND attack_id = :attack_id'; $c->params[':accept_id'] = $accept_list; $c->params[':attack_id'] = User()->id; ManyAttackAccept::model()->deleteAll($c); foreach ($love_users as $love) { $rel = new ManyAttackAccept(); $rel->attack_id = User()->id; $rel->accept_id = $love; $rel->save(); } $this->redirect(rurl()); }