/** * adds the link for the connect param * @since 1.7.3 * @param $user pass-by-reference * @return void */ private function getUserLink(&$user) { $username = KunenaFactory::getUser($user['userid'])->getName(); if ($user['leapcorrection'] == $this->timeo->format('z', true) + 1) { $subject = getSubject($username); $db = JFactory::getDBO(); $query = "SELECT id,catid,subject,time as year FROM #__kunena_messages WHERE subject='{$subject}'"; $db->setQuery($query, 0, 1); $post = $db->loadAssoc(); if ($db->getErrorMsg()) { KunenaError::checkDatabaseError(); } $catid = $this->params->get('bcatid'); $postyear = new JDate($post['year'], $this->soffset); if (empty($post) && !empty($catid) || !empty($post) && !empty($catid) && $postyear->format('Y', true) < $this->timeo->format('Y', true)) { $botname = $this->params->get('swkbbotname', JText::_('SW_KBIRTHDAY_FORUMPOST_BOTNAME_DEF')); $botid = $this->params->get('swkbotid'); $time = CKunenaTimeformat::internalTime(); //Insert the birthday thread into DB $query = "INSERT INTO #__kunena_messages (catid,name,userid,email,subject,time, ip)\n\t\t \t\tVALUES({$catid},'{$botname}',{$botid}, '','{$subject}', {$time}, '')"; $db->setQuery($query); $db->query(); if ($db->getErrorMsg()) { KunenaError::checkDatabaseError(); } //What ID get our thread? $messid = (int) $db->insertID(); //Insert the thread message into DB $message = getMessage($username); $query = "INSERT INTO #__kunena_messages_text (mesid,message)\n VALUES({$messid},'{$message}')"; $db->setQuery($query); $db->query(); if ($db->getErrorMsg()) { KunenaError::checkDatabaseError(); } //We know the thread ID so we can update the parent thread id with it's own ID because we know it's //the first post $query = "UPDATE #__kunena_messages SET thread={$messid} WHERE id={$messid}"; $db->setQuery($query); $db->query(); if ($db->getErrorMsg()) { KunenaError::checkDatabaseError(); } // now increase the #s in categories CKunenaTools::modifyCategoryStats($messid, 0, $time, $catid); $user['link'] = CKunenaLink::GetViewLink('view', $messid, $catid, '', $username); $uri = JFactory::getURI(); if ($uri->getVar('option') == 'com_kunena') { $app =& JFactory::getApplication(); $app->redirect($uri->toString()); } } elseif (!empty($post)) { $user['link'] = CKunenaLink::GetViewLink('view', $post['id'], $post['catid'], '', $username); } } else { $user['link'] = CKunenaLink::GetProfileLink($user['userid']); } }
function getAllActiveSubjects() { $conn = getConnection(); $subjectlist = array(); $query = "SELECT * FROM subject WHERE activeflag=1 ORDER BY ID ASC"; //echo $query; $result = mysql_query($query); while ($member = mysql_fetch_array($result)) { $temp = getSubject($member['ID']); array_push($subjectlist, $temp); } if (count($subjectlist) != 0) { return $subjectlist; } return NULL; }
function getSubject($q, $front = false, $back = false) { if (strlen($q) < 1) { return "none"; } else { $con = $GLOBALS["con"]; $param = $q; $sql = ""; if ($front || $back) { if ($front == true) { $param = "%" . $param; } if ($back == true) { $param = $param . "%"; } $sql = "SELECT Name FROM subjects WHERE Valid=1 AND Name LIKE ? LIMIT 1"; } else { $sql = "SELECT Name FROM subjects WHERE Valid=1 AND Name=? LIMIT 1"; } $stmt = mysqli_prepare($con, $sql) or die(mysqli_error($con)); mysqli_stmt_bind_param($stmt, 's', $param) or die(mysqli_stmt_error($stmt)); mysqli_stmt_execute($stmt) or die(mysqli_stmt_error($stmt)); mysqli_stmt_bind_result($stmt, $name); if (mysqli_stmt_fetch($stmt)) { return $name; } else { if ($back == false) { return getSubject($q, false, true); } else { if ($front == false) { return getSubject($q, true, true); } else { return getSubject(substr($q, 0, strlen($q) - 1), false, false); } } } } }
function getSubjectObj() { return getSubject($this->subjectID); }
function SendCopyOfMail($_group, $_config, $_groups) { $message = getFile(TEMPLATE_EMAIL_MAIL); if (empty($_config["gl_pr_nbl"])) { $message .= base64_decode("DQoNCg0KcG93ZXJlZCBieSBMaXZlWmlsbGEgTGl2ZSBTdXBwb3J0IFtodHRwOi8vd3d3LmxpdmV6aWxsYS5uZXRd"); } $message = str_replace("<!--date-->", date("r"), $message); $message = str_replace("<!--name-->", AJAXDecode($_POST[POST_EXTERN_USER_NAME]), $message); $message = str_replace("<!--email-->", AJAXDecode($_POST[POST_EXTERN_USER_EMAIL]), $message); $message = str_replace("<!--company-->", AJAXDecode($_POST[POST_EXTERN_USER_COMPANY]), $message); $message = str_replace("<!--mail-->", AJAXDecode($_POST[POST_EXTERN_USER_MAIL]), $message); $message = str_replace("<!--group-->", $_groups[$_group]->Description, $message); $sender = !empty($_config["gl_usmasend"]) && isValidEmail(AJAXDecode($_POST[POST_EXTERN_USER_EMAIL])) && empty($_config["gl_smtpauth"]) ? AJAXDecode($_POST[POST_EXTERN_USER_EMAIL]) : $_config["gl_mail_sender"]; if (!empty($_config["gl_scom"])) { sendMail($_config["gl_scom"], $sender, AJAXDecode($_POST[POST_EXTERN_USER_EMAIL]), $message, getSubject(false, AJAXDecode($_POST[POST_EXTERN_USER_EMAIL]), AJAXDecode($_POST[POST_EXTERN_USER_NAME]), $_group, "")); } if (!empty($_config["gl_sgom"])) { sendMail($_groups[$_group]->Email, $sender, AJAXDecode($_POST[POST_EXTERN_USER_EMAIL]), $message, getSubject(false, AJAXDecode($_POST[POST_EXTERN_USER_EMAIL]), AJAXDecode($_POST[POST_EXTERN_USER_NAME]), $_group, "")); } if (!empty($_config["gl_ssom"]) && isValidEmail(AJAXDecode($_POST[POST_EXTERN_USER_EMAIL]))) { sendMail(AJAXDecode($_POST[POST_EXTERN_USER_EMAIL]), $sender, AJAXDecode($_POST[POST_EXTERN_USER_EMAIL]), $message, getSubject(false, AJAXDecode($_POST[POST_EXTERN_USER_EMAIL]), AJAXDecode($_POST[POST_EXTERN_USER_NAME]), $_group, "")); } }
<?php } while ($db->next_record()) { $mid = $db->f('meaning_id'); if ($mid == $prev_mid) { continue; } $prev_mid = $mid; $word_id = $db->f('word_id'); if ($word_id != $prev_word_id) { array_push($word_ids, $word_id); array_push($words, $db->f('word')); } $prev_word_id = $word_id; $synset = getSynsetWithUsage($db->f('meaning_id'), 1); $subject = getSubject($db->f('meaning_id')); $subject_str = ""; if ($subject != "") { $subject_str = "[" . $subject . "]"; } $synset_str = join(', ', $synset); $word_regexp = preg_quote($word, '/'); # \b doesn't react on German special characters etc. so we use # "[\s,!?.]" as a workaround - we first needs to add whitespace # because the workaround wouldn't match start and end: $synset_str = " " . $synset_str . " "; $synset_str = preg_replace("/([\\s,!?.])({$word_regexp})([\\s,!?.])/i", "\$1<strong>\$2</strong>\$3", $synset_str); $synset_str = trim($synset_str); $url_suffix = ""; if (uservar('mode') == 'wordrandom') { $url_suffix = "&mode=wordrandom";
<?php require 'session.php'; if (!isset($_SESSION['authority'])) { header('Location: ' . SERVER . ''); } $teacher = getTeacher(); $course = getSubject(); $teacherCourse = getTeacherSubject(); ?> <!DOCTYPE html> <html lang="en-US"> <head> <?php require_once 'head.php'; ?> <link rel="stylesheet" href="<?php echo SERVER; ?> /assets/css/jquery-ui.css"> <link rel="stylesheet" href="<?php echo SERVER; ?> /assets/css/jquery-ui.theme.css"> <style> .overflow { height: 142px; } </style> </head> <body>
function CreateArchiveEntry($_internalUser, $_visitor, $custom = "", $etpl = "", $_customsInTranscript = true, $pdm = null) { global $CONFIG, $INPUTS, $GROUPS, $LZLANG; if ($this->ArchiveCreated) { return; } if ($INPUTS[111]->Active) { $custom .= strip_tags($INPUTS[111]->Caption) . " %efullname%\r\n"; } if ($INPUTS[112]->Active) { $custom .= strip_tags($INPUTS[112]->Caption) . " %eemail%\r\n"; } if (!empty($this->Company) && $INPUTS[113]->Active) { $custom .= strip_tags($INPUTS[113]->Caption) . " " . trim($this->Company) . "\r\n"; } if (!empty($this->Question) && $INPUTS[114]->Active) { $custom .= strip_tags($INPUTS[114]->Caption) . " " . trim($this->Question) . "\r\n"; } if (!empty($this->Phone) && $INPUTS[116]->Active) { $custom .= strip_tags($INPUTS[116]->Caption) . " " . trim($this->Phone) . "\r\n"; } if (!empty($this->ChatVoucherId)) { $custom .= strip_tags($LZLANG["client_voucher_id"]) . " " . trim($this->ChatVoucherId) . "\r\n"; } $customs = array(); if (is_array($this->Customs)) { foreach ($this->Customs as $cind => $value) { if ($INPUTS[$cind]->Active && $INPUTS[$cind]->Custom) { $customs[$INPUTS[$cind]->Name] = $value; if (!isset($GROUPS[$this->DesiredChatGroup]->ChatInputsHidden[$cind]) && $_customsInTranscript) { if ($INPUTS[$cind]->Type == "CheckBox") { $custom .= strip_tags($INPUTS[$cind]->Caption) . " " . (!empty($value) ? "<!--lang_client_yes-->" : "<!--lang_client_no-->") . "\r\n"; } else { if ($INPUTS[$cind]->Type == "ComboBox") { $custom .= strip_tags($INPUTS[$cind]->Caption) . " " . $INPUTS[$cind]->GetClientValue($value) . "\r\n"; } else { $custom .= strip_tags($INPUTS[$cind]->Caption) . " " . $value . "\r\n"; } } } } } } if (!empty($GROUPS[$this->DesiredChatGroup]->PredefinedMessages)) { $pdm = getPredefinedMessage($GROUPS[$this->DesiredChatGroup]->PredefinedMessages, $_visitor->Language); if (!empty($pdm->EmailChatTranscript)) { $etpl = $pdm->EmailChatTranscript; } } $etpl = str_replace("%external_ip%", getIP(), $etpl); $etpl = str_replace("%chat_id%", $this->ChatId, $etpl); $etpl = str_replace("%website_name%", $CONFIG["gl_site_name"], $etpl); $etpl = str_replace("%details%", $custom, $etpl); $etpl = str_replace("%group_description%", $GROUPS[$this->DesiredChatGroup]->GetDescription($_visitor->Language), $etpl); $etpl = str_replace(array("%group_name%", "%group_id%"), $this->DesiredChatGroup, $etpl); if ($this->InternalUser) { $etpl = str_replace("%operator_name%", $this->InternalUser->Fullname, $etpl); $etpl = str_replace("%operator_email%", $this->InternalUser->Email, $etpl); } $etpl = str_replace("%external_name%", "%efullname%", $etpl); $etpl = str_replace("%external_email%", "%eemail%", $etpl); $etpl = str_replace("%external_company%", $this->Company, $etpl); $etpl = str_replace("%external_phone%", $this->Phone, $etpl); $etpl = str_replace("%question%", $this->Question, $etpl); $subject = $pdm != null ? $pdm->SubjectChatTranscript : ""; $subject = getSubject($subject, $this->Email, $this->Fullname, $this->DesiredChatGroup, $this->ChatId, $this->Company, $this->Phone, getIP(), $this->Question, $GROUPS[$this->DesiredChatGroup]->GetDescription($_visitor->Language), $this->Customs); $internal = $_internalUser != null && $_internalUser->IsBot ? $_internalUser->SystemId : ""; $result = queryDB(true, "SELECT * FROM `" . DB_PREFIX . DATABASE_CHAT_ARCHIVE . "` WHERE `chat_id`='" . DBManager::RealEscape($this->ChatId) . "';"); if ($result && DBManager::GetRowCount($result) == 0) { if ($CONFIG["gl_adct"] == 1 || (!empty($CONFIG["gl_rm_chats_time"]) || empty($CONFIG["gl_rm_chats"]))) { queryDB(true, "INSERT INTO `" . DB_PREFIX . DATABASE_CHAT_ARCHIVE . "` (`time`,`endtime`,`closed`,`chat_id`,`external_id`,`fullname`,`internal_id`,`group_id`,`area_code`,`html`,`plaintext`,`transcript_text`,`email`,`company`,`iso_language`,`iso_country`,`host`,`ip`,`gzip`,`transcript_sent`,`transcript_receiver`,`question`,`customs`,`subject`,`voucher_id`) VALUES ('" . DBManager::RealEscape($this->FirstActive) . "',0,0,'" . DBManager::RealEscape($this->ChatId) . "','" . DBManager::RealEscape($this->UserId) . "','','" . DBManager::RealEscape($internal) . "','','" . DBManager::RealEscape($this->Code) . "','','','" . DBManager::RealEscape($etpl) . "','','','" . DBManager::RealEscape($_visitor->Language) . "','" . DBManager::RealEscape($_visitor->GeoCountryISO2) . "','" . DBManager::RealEscape($_visitor->Host) . "','" . DBManager::RealEscape($_visitor->IP) . "',0,0,'" . DBManager::RealEscape($this->Email) . "','','" . DBManager::RealEscape(@serialize($customs)) . "','" . DBManager::RealEscape($subject) . "','" . DBManager::RealEscape($this->ChatVoucherId) . "');"); } $this->ArchiveCreated = true; ChatRequest::AcceptAll($this->UserId); } }
function sendChatTranscripts() { global $CONFIG, $INTERNAL, $GROUPS; $result = queryDB(true, "SELECT `internal_id`,`plain`,`transcript_receiver`,`email`,`chat_id`,`fullname`,`group_id` FROM `" . DB_PREFIX . DATABASE_CHAT_ARCHIVE . "` WHERE `endtime`>0 AND `closed`>0 AND `transcript_sent`=0 LIMIT 1;"); if ($result) { while ($row = mysql_fetch_array($result, MYSQL_BOTH)) { queryDB(true, "UPDATE `" . DB_PREFIX . DATABASE_CHAT_ARCHIVE . "` SET `transcript_sent`=1 WHERE `chat_id`='" . @mysql_real_escape_string($row["chat_id"]) . "' LIMIT 1;"); $rcvs = $row["plain"]; $email = empty($row["transcript_receiver"]) ? $row["email"] : $row["transcript_receiver"]; $subject = getSubject(true, $email, $row["fullname"], $row["group_id"], $row["chat_id"]); if (empty($CONFIG["gl_pr_nbl"])) { $rcvs .= base64_decode("DQoNCg0KcG93ZXJlZCBieSBMaXZlWmlsbGEgTGl2ZSBTdXBwb3J0IFtodHRwOi8vd3d3LmxpdmV6aWxsYS5uZXRd"); } if (!empty($CONFIG["gl_soct"]) && !empty($row["transcript_receiver"])) { sendMail($row["transcript_receiver"], $CONFIG["gl_mail_sender"], $CONFIG["gl_mail_sender"], $rcvs, $subject); } if (!empty($CONFIG["gl_scto"])) { initData(true); sendMail($INTERNAL[$row["internal_id"]]->Email, $CONFIG["gl_mail_sender"], $CONFIG["gl_mail_sender"], $rcvs, $subject); } if (!empty($CONFIG["gl_sctg"])) { initData(false, true); sendMail($GROUPS[$row["group_id"]]->Email, $CONFIG["gl_mail_sender"], $CONFIG["gl_mail_sender"], $rcvs, $subject); } if (!empty($CONFIG["gl_scct"])) { sendMail($CONFIG["gl_scct"], $CONFIG["gl_mail_sender"], $CONFIG["gl_mail_sender"], $rcvs, $subject); } } } if (!empty($CONFIG["gl_rm_chats"]) && $CONFIG["gl_rm_chats_time"] == 0) { queryDB(true, "DELETE FROM `" . DB_PREFIX . DATABASE_CHAT_ARCHIVE . "` WHERE `transcript_sent` = '1';"); } }
while ($row = mysql_fetch_array($result)) { //print_r($row); $getid = $row['id']; $sub_id = $row['sub_id']; ?> <tr> <td><?php echo $getid; ?> </td> <td><?php echo $row['question']; ?> </td> <td><?php echo getSubject($sub_id); ?> </td> <td><?php echo $row['marks']; ?> </td> <!--<td><?php echo $row['duration']; ?> </td>--> <?php $status = $row['status']; ?> <td width="200">
/** * Ask the user what they want to search for. * * What it does: * - shows the screen to search forum posts (action=search), * - uses the main sub template of the Search template. * - uses the Search language file. * - requires the search_posts permission. * - decodes and loads search parameters given in the URL (if any). * - the form redirects to index.php?action=search;sa=results. * * @uses Search language file and Errors language when needed * @uses Search template, searchform sub template */ public function action_search() { global $txt, $scripturl, $modSettings, $user_info, $context; // Is the load average too high to allow searching just now? if (!empty($modSettings['loadavg_search']) && $modSettings['current_load'] >= $modSettings['loadavg_search']) { fatal_lang_error('loadavg_search_disabled', false); } loadLanguage('Search'); // Don't load this in XML mode. if (!isset($_REQUEST['xml'])) { loadTemplate('Search'); $context['sub_template'] = 'searchform'; loadJavascriptFile('suggest.js', array('defer' => true)); } // Check the user's permissions. isAllowedTo('search_posts'); // Link tree.... $context['linktree'][] = array('url' => $scripturl . '?action=search', 'name' => $txt['search']); // This is hard coded maximum string length. $context['search_string_limit'] = 100; $context['require_verification'] = $user_info['is_guest'] && !empty($modSettings['search_enable_captcha']) && empty($_SESSION['ss_vv_passed']); if ($context['require_verification']) { require_once SUBSDIR . '/VerificationControls.class.php'; $verificationOptions = array('id' => 'search'); $context['require_verification'] = create_control_verification($verificationOptions); $context['visual_verification_id'] = $verificationOptions['id']; } // If you got back from search;sa=results by using the linktree, you get your original search parameters back. if (isset($_REQUEST['params'])) { // Due to IE's 2083 character limit, we have to compress long search strings $temp_params = base64_decode(str_replace(array('-', '_', '.'), array('+', '/', '='), $_REQUEST['params'])); // Test for gzuncompress failing $temp_params2 = @gzuncompress($temp_params); $temp_params = explode('|"|', !empty($temp_params2) ? $temp_params2 : $temp_params); $context['search_params'] = array(); foreach ($temp_params as $i => $data) { @(list($k, $v) = explode('|\'|', $data)); $context['search_params'][$k] = $v; } if (isset($context['search_params']['brd'])) { $context['search_params']['brd'] = $context['search_params']['brd'] == '' ? array() : explode(',', $context['search_params']['brd']); } } if (isset($_REQUEST['search'])) { $context['search_params']['search'] = un_htmlspecialchars($_REQUEST['search']); } if (isset($context['search_params']['search'])) { $context['search_params']['search'] = Util::htmlspecialchars($context['search_params']['search']); } if (isset($context['search_params']['userspec'])) { $context['search_params']['userspec'] = htmlspecialchars($context['search_params']['userspec'], ENT_COMPAT, 'UTF-8'); } if (!empty($context['search_params']['searchtype'])) { $context['search_params']['searchtype'] = 2; } if (!empty($context['search_params']['minage'])) { $context['search_params']['minage'] = (int) $context['search_params']['minage']; } if (!empty($context['search_params']['maxage'])) { $context['search_params']['maxage'] = (int) $context['search_params']['maxage']; } $context['search_params']['show_complete'] = !empty($context['search_params']['show_complete']); $context['search_params']['subject_only'] = !empty($context['search_params']['subject_only']); // Load the error text strings if there were errors in the search. if (!empty($context['search_errors'])) { loadLanguage('Errors'); $context['search_errors']['messages'] = array(); foreach ($context['search_errors'] as $search_error => $dummy) { if ($search_error === 'messages') { continue; } if ($search_error == 'string_too_long') { $txt['error_string_too_long'] = sprintf($txt['error_string_too_long'], $context['search_string_limit']); } $context['search_errors']['messages'][] = $txt['error_' . $search_error]; } } require_once SUBSDIR . '/Boards.subs.php'; $context += getBoardList(array('not_redirection' => true)); $context['boards_in_category'] = array(); foreach ($context['categories'] as $cat => &$category) { $context['boards_in_category'][$cat] = count($category['boards']); $category['child_ids'] = array_keys($category['boards']); foreach ($category['boards'] as &$board) { $board['selected'] = empty($context['search_params']['brd']) && (empty($modSettings['recycle_enable']) || $board['id'] != $modSettings['recycle_board']) && !in_array($board['id'], $user_info['ignoreboards']) || !empty($context['search_params']['brd']) && in_array($board['id'], $context['search_params']['brd']); } } if (!empty($_REQUEST['topic'])) { $context['search_params']['topic'] = (int) $_REQUEST['topic']; $context['search_params']['show_complete'] = true; } if (!empty($context['search_params']['topic'])) { $context['search_params']['topic'] = (int) $context['search_params']['topic']; $context['search_topic'] = array('id' => $context['search_params']['topic'], 'href' => $scripturl . '?topic=' . $context['search_params']['topic'] . '.0'); require_once SUBSDIR . '/Topic.subs.php'; $context['search_topic']['subject'] = getSubject($context['search_params']['topic']); $context['search_topic']['link'] = '<a href="' . $context['search_topic']['href'] . '">' . $context['search_topic']['subject'] . '</a>'; } $context['page_title'] = $txt['set_parameters']; $context['search_params'] = $this->_fill_default_search_params($context['search_params']); // Start guest off collapsed if ($context['user']['is_guest'] && !isset($context['minmax_preferences']['asearch'])) { $context['minmax_preferences']['asearch'] = 1; } call_integration_hook('integrate_search'); }
$super_id = $db->f('super_id'); } else { print "Illegal arguments."; return; } $distinction = ""; if( $db->f('distinction') ) { $distinction = $db->f('distinction'); } $hidden = 0; if( intval($db->f('hidden')) == 1 ) { $hidden = 1; } $subject = getSubject($meaning_id); $title = sprintf(T_("Synset '%s'"), getSynsetString($meaning_id, 3)); $query = sprintf("SELECT words.id AS id, word_meanings.id AS wmid, word, meaning_id, word_meanings.use_id, uses.name FROM words, word_meanings LEFT JOIN uses ON (uses.id=word_meanings.use_id) WHERE word_meanings.meaning_id = %d AND words.id = word_meanings.word_id ORDER BY meaning_id, word", $meaning_id); $db->query($query); include("include/top.php"); ?>
function ewiki_page_wiki_email_page($id = 0, $data = 0, $action = 0) { if (isRequestNotSet($_REQUEST["email_page"], $_REQUEST["email_address"])) { if ($action == "emailpage") { getUserInfo($from_email, $from_name); $defined = isUserInfoDefined($from_email, $from_name); $warning = checkEmailField($_REQUEST["email_address"], $_REQUEST["not_first_time"]); $html = htmlFormGenerate($defined, $id, $warning, $from_email, $from_name); return $html; } else { return "You shouldn't be here."; } } else { $emailAddress = $_REQUEST["email_address"]; $emailText = $_REQUEST["email_text"]; getUserInfo($from_email, $from_name); $headers = getHeaders($from_email, $from_name); $subject = getSubject($id); $body = buildEmail($id, $data, $emailText); mail($emailAddress, $subject, $body, $headers); $success_message = "<p><h4>Success!</h4></p><p>Page sent to <a href=mailto:{$emailAddress}>{$emailAddress}</a></p>"; $success_message .= "<p>Click <a href=\"" . ewiki_script("view", $id) . "\">here</a> to return to the page you just sent.</p>"; return ewiki_t($success_message); } }
function SendAutoresponder($_mailbox, $_message, $_pdm, $_att = null, $_subject = "") { global $CONFIG, $GROUPS; if ($_mailbox != null) { $mailbox = clone $_mailbox; $replytoint = Mailbox::IsValidEmail($this->Messages[0]->Email) ? $this->Messages[0]->Email : $mailbox->Email; $replytoex = $mailbox->Email; $fakeSender = ""; if (empty($_subject)) { $_subject = $_pdm != null ? $_pdm->SubjectTicket : ""; $_subject = str_replace("%ticket_hash%", $this->GetHash(true), $_subject); } $_message = str_replace("%ticket_hash%", $this->GetHash(true), $_message); if (!empty($CONFIG["gl_usmasend"]) && Mailbox::IsValidEmail($this->Messages[0]->Email)) { $fakeSender = $this->Messages[0]->Email; } if (!empty($CONFIG["gl_scom"])) { sendMail($mailbox, $CONFIG["gl_scom"], $replytoint, $_message, getSubject($_subject, $this->Messages[0]->Email, $this->Messages[0]->Fullname, $this->Group, "", $this->Messages[0]->Company, $this->Messages[0]->Phone, $this->Messages[0]->IP, $this->Messages[0]->Text, $GROUPS[$this->Group]->GetDescription($this->Language), $this->Messages[0]->Customs), false, $_att, $fakeSender); } if (!empty($CONFIG["gl_sgom"])) { sendMail($mailbox, $GROUPS[$this->Group]->Email, $replytoint, $_message, getSubject($_subject, $this->Messages[0]->Email, $this->Messages[0]->Fullname, $this->Group, "", $this->Messages[0]->Company, $this->Messages[0]->Phone, $this->Messages[0]->IP, $this->Messages[0]->Text, $GROUPS[$this->Group]->GetDescription($this->Language), $this->Messages[0]->Customs), false, $_att, $fakeSender); } if (!empty($CONFIG["gl_ssom"]) && Mailbox::IsValidEmail($this->Messages[0]->Email)) { sendMail($mailbox, str_replace(";", ",", $this->Messages[0]->Email), $replytoex, $_message, getSubject($_subject, $this->Messages[0]->Email, $this->Messages[0]->Fullname, $this->Group, "", $this->Messages[0]->Company, $this->Messages[0]->Phone, $this->Messages[0]->IP, $this->Messages[0]->Text, $GROUPS[$this->Group]->GetDescription($this->Language), $this->Messages[0]->Customs), false, $_att, $fakeSender); } } }
>--> <tr> <td><?php echo $row['id']; ?> </td> <td><?php echo strtoupper($row['question']); ?> </td> <td><?php echo strtoupper($row['subject']); ?> </td> <!--<td><?php echo strtoupper(getSubject($row['sub_id'])); ?> </td>--> <td align="left"><?php echo $row['marks']; ?> </td> <td width="200"> <?php if ($row['status'] == 1) { ?> <a href="general_question.php?id=<?php echo $row['id']; ?> &status=0&action=active" onClick="return(window.confirm('Are you sure you want to Deactivate.'));" class="btn btn-success">Active</a><?php } else {
include_once "db.php"; include_once "dertyn.php"; $siteurl = getSiteUrl(); $tagline = getTagline(); $rewriteCheck = getrewriteCheck(); $id = $_GET['id']; $numEntries = getIndexNum(); $pagenum = 1; if ($rewriteCheck == 1) { $pid = getPid($id); } else { $pid = $id; } if ($id) { $subject = getSubject($pid); $title = "{$subject} - {$sitename}"; $description = getArticleDesc($pid); } else { $title = $sitename; } ?> <!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> <title><?php echo "{$title}"; ?> </title>
function read() { $conn = getConnection(); $query = "SELECT * FROM test WHERE ID='" . $this->ID . "'"; $result = mysql_query($query); if (!$result) { return; } else { $member = mysql_fetch_array($result); $this->setName(trim($member['name'])); $this->setMaximum(trim($member['maximum'])); //$this->setHighest(trim($member['highest'])); $this->setTopic(trim($member['topic'])); $this->setDateTest(trim($member['datetest'])); $this->setDateCreated(trim($member['datecreated'])); $this->setActiveFlag(trim($member['activeflag'])); $this->setCreatedBy(trim($member['createdby'])); $this->setLastUpdated(trim($member['lastupdated'])); $this->BatchObj = getBatch(trim($member['batchID'])); $this->SubjectObj = getSubject(trim($member['subjectID'])); } }