function delete_vm($service_id) { $vm = get_vm($service_id); if (!isset($vm->_id)) { $vm->setErrors("Can't Load Virtual Machine"); return $vm; } $vm->delete(); if ($vm->error) { $vm->setErrors("Can't Delete Virtual Machine"); return $vm; } $sql_delete_service = sprintf("DELETE FROM tblonappservices WHERE service_id = '%s'", $service_id); if (!full_query($sql_delete_service)) { $vm->setErrors("Can't delete data from tblonappservices"); return $vm; } _ips_unassign_all($service_id); sendmessage('Virtual Machine Deleted', $service_id); return $vm; }
public function doAnnouncement($id) { global $club, $messageData, $messageSubject, $team, $sms, $user, $recipientMobile, $recipientEmail; $user = Auth::user(); $club = $user->Clubs()->FirstOrFail(); $event = Evento::where("id", "=", $id)->where("club_id", '=', $club->id)->FirstOrFail(); $participants = Participant::where('event_id', '=', $event->id)->get(); $messageData = Input::get('message'); $messageSubject = Input::get('subject'); $sms = substr($messageData, 0, 140) . " {$club->name} - Do not reply"; $uuid = Uuid::generate(); //get list of recepients $recipientUser = array(); $recipientPlayer = array(); $recipientContact = array(); $recipientEmail = array(); $recipientMobile = array(); //do selection for children events if ($event->children->count() > 0) { foreach ($event->children as $e) { foreach ($e->participants as $member) { //only members that accepted joined if ($member->accepted_user) { $user = User::find($member->accepted_user); $player = Player::find($member->player_id); $recipientUser[] = array('name' => $user->profile->firstname . " " . $user->profile->lastname, 'email' => $user->email, 'mobile' => $user->profile->mobile); foreach ($player->contacts as $contact) { $recipientContact[] = array('name' => $contact->firstname . " " . $contact->lastname, 'email' => $contact->email, 'mobile' => $contact->mobile); } //allow players with email and mobile if ($player->mobile && $player->email) { $recipientPlayer[] = array('name' => $player->firstname . " " . $player->lastname, 'email' => $player->email, 'mobile' => $player->mobile); } } } } } else { foreach ($participants as $member) { //only members that accepted joined if ($member->accepted_user) { $user = User::find($member->accepted_user); $player = Player::find($member->player_id); $recipientUser[] = array('name' => $user->profile->firstname . " " . $user->profile->lastname, 'email' => $user->email, 'mobile' => $user->profile->mobile); foreach ($player->contacts as $contact) { $recipientContact[] = array('name' => $contact->firstname . " " . $contact->lastname, 'email' => $contact->email, 'mobile' => $contact->mobile); } //allow players with email and mobile if ($player->mobile && $player->email) { $recipientPlayer[] = array('name' => $player->firstname . " " . $player->lastname, 'email' => $player->email, 'mobile' => $player->mobile); } } } } //send default function function sendmessage($destination) { global $club, $messageData, $messageSubject, $event, $sms, $user, $recipientMobile, $recipientEmail; foreach ($destination as $recipient) { //send email notification of acceptance queue $data = array('club' => $club, 'messageOriginal' => $messageData, 'subject' => $messageSubject, 'team' => $event); Mail::later(3, 'emails.announcement.default', $data, function ($message) use($recipient, $club, $messageSubject) { $message->to($recipient['email'], $recipient['name'])->subject("{$messageSubject} | " . $club->name); }); $recipientEmail[] = array('name' => $recipient['name'], 'email' => $recipient['email']); if (Input::get('sms')) { $recipientMobile[] = array('name' => $recipient['name'], 'mobile' => $recipient['mobile']); //queue sms Queue::push(function ($job) use($recipient, $sms) { Twilio::message($recipient['mobile'], $sms); $job->delete(); }); } } } // send to user sendmessage($recipientUser); //send to player if (Input::get('players')) { sendmessage($recipientPlayer); } //send to contacts if (Input::get('family')) { sendmessage($recipientContact); } //save message to database $announcement = new Announcement(); $announcement->id = $uuid; $announcement->subject = $messageSubject; $announcement->message = $messageData; $announcement->sms = $sms; $announcement->to_email = serialize($recipientEmail); $announcement->to_sms = serialize($recipientMobile); $announcement->event_id = $event->id; $announcement->club_id = $club->id; $announcement->user_id = $user->id; //$status = $announcement->save(); return array('success' => true, 'email' => $recipientEmail, 'mobile' => $recipientMobile); }
} } } if (isset($_GET["auth_key"])) { if ($_GET["auth_key"] == $auth_key) { $db = new PDO($db_host, $db_user, $db_pw); $statement = "SELECT * FROM " . $db_table; $user = $db->query($statement); $user = $user->fetchAll(); $i = 0; if (isset($_GET["refresh"])) { if ($_GET["refresh"] == true) { updatecache(); foreach ($user as $user_id) { $i++; $m = new Memcached(); $m->addServer($memcached_host, $memcached_port); $text = $new_article_text . $m->get('latest_article'); sendmessage('message', $user_id[0], $text); } } } if (isset($_GET["message"])) { foreach ($user as $user_id) { $i++; sendmessage('message', $user_id[0], $_GET["message"]); } } echo 'Sent to ' . $i . ' subscribers.'; } }
function OnAppElastic_Custom_GeneratePassword($params) { $serviceID = $params['serviceid']; $clientID = $params['clientsdetails']['userid']; $serverID = $params['serverid']; $password = OnAppElasticUsersModule::generatePassword(); $query = "SELECT\n\t\t\t\t\t`OnAppUserID`\n\t\t\t\tFROM\n\t\t\t\t\t`OnAppElasticUsers`\n\t\t\t\tWHERE\n\t\t\t\t\tserverID = '{$serverID}'\n\t\t\t\t\tAND WHMCSUserID = '{$clientID}'\n\t\t\t\t\tAND serviceID = '{$serviceID}'"; // todo use placeholders $result = full_query($query); $OnAppUserID = mysql_result($result, 0); $module = new OnAppElasticUsersModule($params); $OnAppUser = $module->getObject('OnApp_User'); $OnAppUser->_id = $OnAppUserID; $OnAppUser->_password = $password; $OnAppUser->save(); $lang = $module->loadLang()->Client; $data = new stdClass(); if (!is_null($OnAppUser->error)) { $data->status = false; $data->message = $lang->PasswordNotSet . ':<br/>'; $data->message .= $OnAppUser->getErrorsAsString('<br/>'); } else { // Save OnApp login and password full_query("UPDATE\n\t\t\t\ttblhosting\n\t\t\tSET\n\t\t\t\tpassword = '******'\n\t\t\tWHERE\n\t\t\t\tid = '{$serviceID}'"); sendmessage('OnApp account password has been generated', $serviceID); $data->status = true; $data->message = $lang->PasswordSet; } echo json_encode($data); exit; }
$run = 0; } if ($userID) { $run = 1; } else { $CAPCLASS = new Captcha(); if ($CAPCLASS->check_captcha($_POST['captcha'], $_POST['captcha_hash'])) { $run = 1; } } if ($_POST['mode'] and $run) { $mode = $_POST['mode']; $type = $_POST['type']; $info = $_POST['description']; $id = $_POST['id']; if ($info) { $info = clearfromtags($info); } else { $info = $_language->module['no_informations']; } $date = time(); $message = sprintf($_language->module['report_message'], $mode, $type, $id, $info, $id); //send message to file-admins $ergebnis = safe_query("SELECT userID FROM " . PREFIX . "user_groups WHERE files='1'"); while ($ds = mysql_fetch_array($ergebnis)) { sendmessage($ds['userID'], $type . ': ' . $mode, $message); } redirect("index.php?site=" . $type, $_language->module['report_recognized'], "3"); } else { echo $_language->module['wrong_securitycode']; }
<?php require_once 'includes/PushBots.class.php'; $_POST = json_decode(file_get_contents('php://input'), TRUE); function sendmessage($message) { $pb = new PushBots(); // Application ID $appSecret = '01051c0a6ff7ce415584f3718c9c4cc7'; // Application Secret $appID = '56a886bc177959da488b4567'; $pb->App($appID, $appSecret); $customfields = array("PushBots" => "true"); $pb->Payload($customfields); // Notification Settings $pb->Alert($message); $pb->Platform(array("0", "1")); $pb->Badge("+2"); $pb->AliasData(1, "APA91bFpQyCCczXC6hz4RTxxxxx", "test"); // set Alias on the server $pb->setAlias(); // Push it ! $pb->Push(); return null; } if (true) { sendmessage($_POST['message']); echo "success"; } else { echo "You are not logged in"; }
if ($message[0] != '/') { exit; } $arrMessage = explode(' ', $message); switch ($arrMessage[0]) { case "/oi": sendmessage($chatId, "Oi " . $usuario); break; case "/previsao": $url = 'http://developers.agenciaideias.com.br/tempo/json/sao%20jose%20dos%20campos-sp'; $retorno = grab_page($url); $previsao = json_decode($retorno, true); sendmessage($chatId, "Tempo em SJC: " . $previsao["agora"]["temperatura"] . " - " . $previsao["agora"]["descricao"]); break; default: sendmessage($chatId, "Comando não reconhecido!"); break; } function sendmessage($s_chatId, $s_message) { $url = $GLOBALS[website] . "/sendmessage?chat_id=" . $s_chatId . "&text=" . $s_message; file_get_contents($url); } function grab_page($site) { $ch = curl_init(); curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']); curl_setopt($ch, CURLOPT_TIMEOUT, 50); curl_setopt($ch, CURLOPT_URL, $site); ob_start();
$CAPCLASS = new Captcha(); if ($CAPCLASS->check_captcha($_POST['captcha'], $_POST['captcha_hash'])) { $run = 1; } } if ($run) { if (mb_strlen($_POST['message'])) { safe_query("INSERT INTO\r\n\t\t\t\t\t\t\t" . PREFIX . "guestbook (\r\n\t\t\t\t\t\t\t\tdate, \r\n\t\t\t\t\t\t\t\tname, \r\n\t\t\t\t\t\t\t\temail, \r\n\t\t\t\t\t\t\t\thp, \r\n\t\t\t\t\t\t\t\ticq, \r\n\t\t\t\t\t\t\t\tip, \r\n\t\t\t\t\t\t\t\tcomment\r\n\t\t\t\t\t\t\t)\r\n\t\t\t VALUES (\r\n\t\t\t \t'" . $date . "', \r\n\t\t\t \t'" . $name . "', \r\n\t\t\t \t'" . $email . "', \r\n\t\t\t \t'" . $url . "', \r\n\t\t\t \t'" . $icq . "', \r\n\t\t\t \t'" . $GLOBALS['ip'] . "', \r\n\t\t\t \t'" . $_POST['message'] . "'\r\n\t\t\t );"); if ($gb_info) { $ergebnis = safe_query("SELECT userID FROM " . PREFIX . "user_groups WHERE feedback='1'"); while ($ds = mysql_fetch_array($ergebnis)) { $touser[] = $ds['userID']; } $message = str_replace('%insertid%', 'id_' . mysql_insert_id(), mysql_real_escape_string($_language->module['pmtext_newentry'])); foreach ($touser as $id) { sendmessage($id, mysql_real_escape_string($_language->module['pmsubject_newentry']), $message); } } header("Location: index.php?site=guestbook"); } else { header("Location: index.php?site=guestbook&action=add&error=message"); } } else { header("Location: index.php?site=guestbook&action=add&error=captcha"); } } elseif (isset($_GET['delete'])) { include "_mysql.php"; include "_settings.php"; include "_functions.php"; $_language->read_module('guestbook'); if (!isfeedbackadmin($userID)) {
function OnAppvCD_UnsuspendAccount($params) { $module = new OnAppvCDModule($params); $tableName = $module::MODULE_NAME . '_Users'; $lang = $module->loadLang()->Admin; $serverID = $params['serverid']; $clientID = $params['clientsdetails']['userid']; $serviceID = $params['serviceid']; $OnAppUserID = Capsule::table($tableName)->where('serverID', $serverID)->where('serviceID', $serviceID)->pluck('OnAppUserID'); if (!$OnAppUserID) { return sprintf($lang->Error_UserNotFound, $clientID, $serverID); } $OnAppUser = $module->getObject('User'); $unset = ['time_zone', 'user_group_id', 'locale']; $OnAppUser->unsetFields($unset); $OnAppUser->_id = $OnAppUserID; $OnAppUser->activate_user(); if (!is_null($OnAppUser->error)) { $errorMsg = $lang->Error_UnsuspendUser . ':<br/>'; $errorMsg .= $OnAppUser->getErrorsAsString('<br/>'); return $errorMsg; } // todo rename subject sendmessage('OnApp account has been unsuspended', $serviceID); return 'success'; }
} header("Location: index.php?site=messenger&action=outgoing"); exit; } else { $_SESSION['message_subject'] = $title; $_SESSION['message_body'] = $message; $_SESSION['message_error'] = true; header("Location: index.php?site=messenger&action=newmessage"); exit; } } elseif (isset($_POST['reply'])) { include "_mysql.php"; include "_settings.php"; include "_functions.php"; if (isset($userID)) { sendmessage($_POST['id'], $_POST['title'], $_POST['message'], $userID); } header("Location: index.php?site=messenger&action=outgoing"); exit; } elseif ($userID) { $_language->read_module('messenger'); if (isset($_REQUEST['action'])) { $action = $_REQUEST['action']; } else { $action = "incoming"; } eval("\$title_messenger = \"" . gettemplate("title_messenger") . "\";"); echo $title_messenger; if ($action == "incoming") { if (isset($_REQUEST['entries'])) { $entries = $_REQUEST['entries'];
if ($conn->connect_error) { die("Connection failed: " . $conn->connect_error); } if (!($result = $conn->query("SELECT pingedat,status,message FROM {$tname} ORDER BY pingedat DESC LIMIT 10"))) { die("QUERY FAILED"); } $data = ""; $ping = getPing($_SESSION['me'], $uid, "no"); while ($row = $result->fetch_assoc()) { $date = new DateTime($row['pingedat']); $data = "<div class=\"message\"><span class=\"people\">" . (explode("+", $row['status'])[1] != $uid ? "You" : $ping['fname'] . " " . $ping['lname']) . "</span><p class=\"message\">" . $row['message'] . "</p><span class=\"time\">" . time2str($date->getTimestamp()) . "</span></div>" . $data; } if (!$conn->query("UPDATE userlist SET activity = '" . date('Y-m-d H:i:s') . "' WHERE userid = " . $me['userid'] . ";")) { die("+ONLINE STAT FAILED TO UPDATE" . $conn->error); } return $data; } if (isset($_POST['callfunction'])) { switch ($_POST['callfunction']) { case 'listPings': echo listPings($_POST['querydata']); break; case 'sendmessage': echo sendmessage($_POST['text'], $_POST['uid']); break; case 'getmessage': session_start(); echo getmessage(getPing($_SESSION['me'], $_POST['uid'], 'no'), $_SESSION['me']); break; } }
<?php include "../config.php"; include "functions/sendmail.php"; $con = mysqli_connect($hostname, $usename, $password, $database); $sql = 'update Settings set id=4, value="' . $_POST["mail"] . '" where code="mail"'; mysqli_query($con, $sql); $sql = 'update Settings set code="title", value="' . $_POST["title"] . '" where id=1'; mysqli_query($con, $sql); $sql = 'update Settings set code="maintainanceMode", value="' . $_POST["mmode"] . '" where id=2'; mysqli_query($con, $sql); $sql = 'update Settings set code="welcomemsg", value="' . $_POST["content"] . '" where id=3'; mysqli_query($con, $sql); $sql = 'update Settings set code="api", value="' . $_POST["api"] . '" where id=5'; mysqli_query($con, $sql); mysqli_close($con); mysqli_close($con); sendmessage($_POST["mail"], "Settings has been Changed", "New Settings Are" . $_POST["mail"] . ", " . $_POST["title"]); header("Location: settings.php?error=1");
readnotifications($loginid, $notiid); break; case 'countnotifications': countnotifications($loginid); break; case 'mailbox': mailbox($loginid); break; case 'setpriority': setpriority($loginid, $msgid, $priority); break; case 'viewmessage': viewmessage($loginid, $msgid, $fromuserid); break; case 'sendmessage': sendmessage($loginid, $message, $touserid, $subject, $attch, $date); break; case 'previewmsg': previewmsg($loginid, $msgid, $msgstatusnum); break; case 'sendmainmessage': sendmainmessage($loginid, $message, $touserid, $subject, $attch, $date); break; case 'searchusertosendmail': searchusertosendmail($loginid, $search); break; case 'mzgimageupload': mzgimageupload($loginid, $date); break; case 'likedislike': likedislike($loginid, $cid, $date, $element);
+----------------------------------------------------+ | Addon Contact Form function main.php | Version 3.2.5 SQLite/MySQL +----------------------------------------------------+ | Released under the terms & conditions of v2 of the | GNU General Public License. For details refer to | the included gpl.txt file or visit http://gnu.org +----------------------------------------------------*/ global $set, $contactmessage, $message; if (file_exists("addons/contact/lang/lang_" . $set['language'] . ".php")) { require_once "addons/contact/lang/lang_" . $set['language'] . ".php"; } else { require_once "addons/contact/lang/lang_en_US.php"; } if ($_POST['submit'] == "Send message") { $message = sendmessage(); if ($message != "") { $out .= "<div class=\"LNE_message\">" . $message . "</div>\n"; } } function contact() { global $pagenum, $contactmessage, $set; $out = "<div id=\"LNE_contact\">\n<form method=\"post\" id=\"LNE_contactform\" action=\"\"><fieldset>\n"; if ($_SESSION['user'] != "") { $out .= "<input type=\"hidden\" name=\"name\" value=\"" . $_SESSION['user'] . "\" />\n"; $out .= "<input type=\"hidden\" name=\"email\" value=\"\" />\n"; } else { $out .= "<p><b>{$contactmessage['30']}:</b><br />\n"; $out .= "<input type=\"text\" name=\"name\" value=\"\" /></p>\n"; $out .= "<p><b>{$contactmessage['31']}:</b><br />\n";
<?php /*This file handles extra email message sending.*/ require "config.php"; require "functions.php"; $sitepassword = md5(md5($sitepassword, false), false); if (is_numeric($_POST['mailid']) == TRUE && $_POST['sitepassword'] == $sitepassword) { sendmessage($_POST['mailid'], $_POST['mailbody']); } else { if ($_POST['sitepassword'] == $sitepassword) { if ($_POST['mailid'] == "ALL") { $db = mysql_connect($dbserver, $dbuser, $dbpassword); mysql_select_db($dbname, $db); $sql = "SELECT * FROM file order by id asc;"; $result = mysql_query($sql); while ($row = mysql_fetch_assoc($result)) { $mailid = $row['id']; sendmessage($mailid, $_POST['mailbody']); } } } else { fallback(); } }
safe_query("INSERT INTO " . PREFIX . "upcoming ( date, type, squad, opponent, opptag, opphp, oppcountry, maps, server, league, leaguehp, warinfo )\r\n values( '" . $date . "', 'c', '" . $squad . "', '" . $opponent . "', '" . $opptag . "', '" . $opphp . "', '" . $oppcountry . "', '" . $maps . "', '" . $server . "', '" . $league . "', '" . $leaguehp . "', '" . $warinfo . "' ) "); if (isset($chID) and $chID > 0) { safe_query("DELETE FROM " . PREFIX . "challenge WHERE chID='" . $chID . "'"); } if ($messages) { $replace = array('%date%' => date("d.m.Y", $date), '%opponent_flag%' => $oppcountry, '%opp_hp%' => $opphp, '%opponent%' => $opponent, '%league_hp%' => $leaguehp, '%league%' => $league, '%warinfo%' => $warinfo); $ergebnis = safe_query("SELECT userID FROM " . PREFIX . "squads_members WHERE squadID='{$squad}'"); $tmp_lang = new Language(); while ($ds = mysql_fetch_array($ergebnis)) { $id = $ds['userID']; $tmp_lang->set_language(getuserlanguage($id)); $tmp_lang->read_module('calendar'); $title = $tmp_lang->module['clanwar_message_title']; $message = $tmp_lang->module['clanwar_message']; $message = str_replace(array_keys($replace), array_values($replace), $message); sendmessage($id, $title, $message); } } header("Location: index.php?site=calendar&tag={$day}&month={$month}&year={$year}"); } elseif ($action == "delete") { include "_mysql.php"; include "_settings.php"; include "_functions.php"; $_language->read_module('calendar'); if (!isclanwaradmin($userID)) { die($_language->module['no_access']); } $upID = $_GET['upID']; safe_query("DELETE FROM " . PREFIX . "upcoming WHERE upID='{$upID}'"); safe_query("DELETE FROM " . PREFIX . "upcoming_announce WHERE upID='{$upID}'"); header("Location: index.php?site=calendar");
function onappusers_GeneratePassword($params) { global $_LANG; $serviceID = $params['serviceid']; $clientID = $params['clientsdetails']['userid']; $serverID = $params['serverid']; $password = OnApp_UserModule::generatePassword(); $query = "SELECT\n onapp_user_id\n FROM\n tblonappusers\n WHERE\n server_id = '{$serverID}'\n AND client_id = '{$clientID}'\n AND service_id = '{$serviceID}'"; $result = full_query($query); $OnAppUserID = mysql_result($result, 0); $module = new OnApp_UserModule($params); $OnAppUser = $module->getOnAppObject('OnApp_User'); $OnAppUser->_id = $OnAppUserID; $OnAppUser->_password = $password; $OnAppUser->save(); if (!is_null($OnAppUser->error)) { $errorMsg = $_LANG['onappuserserruserupgrade'] . ':<br/>'; $errorMsg .= $OnAppUser->getErrorsAsString('<br/>'); return $errorMsg; } // Save OnApp login and password full_query("UPDATE\n tblhosting\n SET\n password = '******'\n WHERE\n id = '{$serviceID}'"); sendmessage($_LANG['onappuserschangeaccountpassword'], $serviceID); return 'success'; }
foreach ($touser as $id) { $tmp_lang->set_language(getuserlanguage($id)); $tmp_lang->read_module('joinus'); $message = '[b]' . $tmp_lang->module['someone_want_to_join_your_squad'] . ' ' . mysql_real_escape_string(getsquadname($squad)) . '![/b] ' . $tmp_lang->module['nick'] . ' ' . $nick . ' ' . $tmp_lang->module['name'] . ': ' . $name . ' ' . $tmp_lang->module['age'] . ': ' . $age . ' ' . $tmp_lang->module['mail'] . ': [email]' . $email . '[/email] ' . $tmp_lang->module['messenger'] . ': ' . $messenger . ' ' . $tmp_lang->module['city'] . ': ' . $city . ' ' . $tmp_lang->module['clan_history'] . ': ' . $clanhistory . ' ' . $tmp_lang->module['info'] . ': ' . $info . ' '; sendmessage($id, $tmp_lang->module['message_title'], $message); } } echo $_language->module['thanks_you_will_get_mail']; unset($_POST['nick'], $_POST['name'], $_POST['email'], $_POST['messenger'], $_POST['age'], $_POST['city'], $_POST['clanhistory'], $_POST['info']); $show = false; } else { $fehler = implode('<br />• ', $error); $show = true; $showerror = '<div class="errorbox"> <b>' . $_language->module['problems'] . ':</b><br /><br /> • ' . $fehler . ' </div>'; } } if ($show == true) {
function registra($usr, $idkey, $tel, $imei) { $con = mysqli_connect("localhost", "root", "", "testing"); $idKey = $idkey; $insert = "INSERT INTO devices (name, idkey, imei, tel, status) VALUES ('" . $usr . "', '" . $idkey . "','" . $imei . "','" . $tel . "','Online')"; $results = mysqli_query($con, $insert); mysqli_close($con); $msg = 'ack&1&' . $usr . "&" . $idKey; sendmessage($msg, $idKey); }
$icq = geticq($userID); $run = 1; } else { $name = $_POST['gbname']; $email = $_POST['gbemail']; $url = $_POST['gburl']; $icq = $_POST['icq']; $CAPCLASS = new Captcha(); if ($CAPCLASS->check_captcha($_POST['captcha'], $_POST['captcha_hash'])) { $run = 1; } } if ($run) { safe_query("INSERT INTO " . PREFIX . "user_gbook (userID, date, name, email, hp, icq, ip, comment)\n\t\t\t\t\t\t\t\tvalues('" . $id . "', '" . $date . "', '" . $_POST['gbname'] . "', '" . $_POST['gbemail'] . "', '" . $_POST['gburl'] . "', '" . $_POST['icq'] . "', '" . $ip . "', '" . $_POST['message'] . "')"); if ($id != $userID) { sendmessage($id, $_language->module['new_guestbook_entry'], str_replace('%guestbook_id%', $id, $_language->module['new_guestbook_entry_msg'])); } } redirect('user/' . getnickname($id) . '/', '', 0); } elseif (isset($_GET['delete'])) { if (!isanyadmin($userID) and $id != $userID) { die($_language->module['no_access']); } foreach ($_POST['gbID'] as $gbook_id) { safe_query("DELETE FROM " . PREFIX . "user_gbook WHERE gbID='{$gbook_id}'"); } redirect('user/' . getnickname($id) . '/', '', 0); } else { $bg1 = BG_1; $bg2 = BG_2; $gesamt = mysql_num_rows(safe_query("SELECT gbID FROM " . PREFIX . "user_gbook WHERE userID='" . $id . "'"));
echo "<div class=\"row\">"; echo "<div class=\"jumbotron\">"; echo "<div class=\"container\">"; echo "<h1 style=\"text-align:center\">Chat with {$name} !</h1>"; $messageErr = "Required"; $message = ""; if ($_SERVER["REQUEST_METHOD"] == "POST") { if (empty($_POST["message"])) { $messageErr = "Message is required!"; } else { $message = test_input($_POST['message']); $messageErr = ""; } } if ($messageErr == "") { sendmessage($login, $altuserlogin, $message); } echo <<<START </div> </div> </div> </header> START; } else { //NOT AUTHORIZED $authorized = false; echo <<<START <div class="row"> <div class="jumbotron"> <div class="container"> START;