<?php

require_once "../includes/header.php";
?>

<?php 
if (isset($_GET["subj_id"])) {
    $subj_id = $_GET["subj_id"];
    $result = get_subject($subj_id);
    $row = mysql_fetch_array($result);
    $subj_id = $row["subj_id"];
    $subj_first_name = $row["first_name"];
    $subj_last_name = $row["last_name"];
    $subj_gender = $row["gender"];
    $subj_bdate = $row["birth_date"];
    $subj_email = $row["email"];
    $subj_tested = $row["tested"];
    $subj_status = $row["status"];
    ?>

   <h1 class="subjects"><?php 
    echo $subj_first_name . " " . $subj_last_name;
    ?>
</h1>
   
   <div id="list_details">
   <?php 
    output_message();
    ?>

      <p><strong><?php 
 function getSubjectinfo()
 {
     if ($this->subject_id) {
         return get_subject($this->subject_id);
     }
     return false;
 }
示例#3
0
文件: tropy.php 项目: h16o2u9u/rtoss
function do_write($id)
{
    global $form, $maxlength, $maxlines, $maxpages, $allid;
    $msg = $form['mymsg'];
    $msg = preg_replace('/\\n+$/', "\n", $msg);
    $msglen = strlen($msg);
    $cr = $msglen - strlen(str_replace("\n", "", $msg));
    if ($maxpages < count($allid)) {
        DELETE_random_page();
    }
    if ($msglen > $maxlength) {
        print_header($id, "length > {$maxlength}");
        print_editform($id, $msg);
        echo get_footer();
    } elseif ($cr >= $maxlines) {
        print_header($id, "lines > {$maxlines}");
        print_editform($id, $msg);
        echo get_footer();
    } else {
        if ($form['mymsg']) {
            // =date -> real date
            $msg = preg_replace('/=date/i', date('r'), $msg);
            STORE($id, $msg);
            send_mail($id, get_subject($id), 'edit', $msg);
            unlink_html($id);
            build_html($id);
            print_jumpto($id);
        } else {
            send_mail($id, get_subject($id), 'delete', FETCH($id));
            DELETE($id);
            unlink_html($id);
            do_random();
        }
    }
}
示例#4
0
/**
 * Sends a newsletter.
 *
 * Sends it to test recipient if provided, else to configured recipient
 *
 * @param      boolean|string  $test_recipient  The test recipient
 */
function send_newsletter($test_recipient = false)
{
    $boundary = uniqid('tela');
    $headers[] = 'Content-Type: multipart/alternative;boundary=' . $boundary . '; charset=UTF-8';
    $headers[] = 'Content-Transfer-Encoding: 8bit';
    $headers[] = 'From: Tela Botanica <*****@*****.**>';
    $headers[] = 'Reply-To: accueil@tela-botanica.org';
    $headers[] = 'MIME-Version: 1.0';
    $headers[] = 'X-Mailer: PHP/' . phpversion();
    add_action('phpmailer_init', 'mailer_config', 10, 1);
    function mailer_config(PHPMailer $mailer)
    {
        // $mailer->IsSMTP();
        // $mailer->SMTPDebug = 2; // write 0 if you don't want to see client/server communication in page
        $mailer->CharSet = "utf-8";
    }
    wp_mail($test_recipient ?: get_config()['newsletter_recipient'], get_subject(), get_newsletter($boundary), $headers);
}
示例#5
0
        # Don't set a max value when doing the email, as we don't need to worry
        # about the display
        $p->max_value_length = null;

        list($email, $is_text) = get_email_addr();
        $bibid = valid_bibid($_REQUEST['bibid']);

        $record = $p->get_record($bibid);
        array_walk_recursive($record, "html_entity_decode_ref");
        
        $record["info_keys"] = $p->email_detail_keys;

        $contents = get_detail_text($record, $is_text);

        $headers = get_email_headers($p);
        $subject = get_subject($p, $is_text, $record);

        mail($email, $subject, $contents, $headers);

        $sm = get_smarty();
        $sm->assign("bibid", $bibid);

        if ($is_text) {
            $sm->display("responses/text_success.html");
        } else {
            $sm->display("responses/email_success.html");
        }

    } catch (Exception $e) {
        $sm = get_smarty();
        $sm->assign("error", $e->getMessage());
 public function curriculum_settings_delete_subject($subject_id = false)
 {
     if ($subject_id && is_subject_exist($subject_id)) {
         $subjectinfo = get_subject($subject_id);
         if ($subjectinfo) {
             $subjectinfo->delete();
             if (is_subject_exist($subject_id)) {
                 //success..
             } else {
                 //failed..
             }
             redirect("dashboard/curriculums/settings/subjects");
         } else {
             show_404();
         }
     } else {
         show_404();
     }
 }
示例#7
0
文件: index.php 项目: ritthai/LMS
             header("Content-Type: text/html");
             header("Connection:");
             header("Content-length:");
             echo "Successfully reported.";
         }
     }
 } else {
     if (isset($_GET['action']) && $_GET['action'] != "") {
         // Action with no params
         $action = $_GET['action'];
         switch ($action) {
             case 'list':
                 $args['list'] = ResourceReport::ListAll();
                 foreach ($args['list'] as $k => $v) {
                     $args['list'][$k]['user_name'] = User::GetAttrib($v['user_id'], 'name');
                     $args['list'][$k]['resource_subject'] = get_subject($v['resource_id'], $v['type']);
                 }
                 include "views/{$action}.view.php";
                 break;
             case 'show':
                 Error::generate('notice', 'Invalid file ID', Error::$FLAGS['single']);
                 header("Location: {$PAGE_REL_URL}");
                 break;
             default:
                 Error::generate('suspicious', "Invalid action {$action} in resource reports controller");
                 header("Location: {$PAGE_REL_URL}");
         }
     } else {
         include "views/index.view.php";
     }
 }
         $forward_names = null;
         foreach ($forward_tos as $fts) {
             $name = username_to_fullname($dbh, $fts);
             $forward_names .= $name . ", ";
         }
         $forward_names_string = substr($forward_names, 0, -2);
         $forward_text = "<<<Forwarded this message to {$forward_names_string}" . "\n\n" . $reply_text;
         $tos = generate_recipients($dbh, $thread_id);
         $to = $tos['from'] . ',' . $tos['tos'];
         $cc = $tos['ccs'];
         $data = array('thread_id' => $thread_id, 'to' => $to, 'ccs' => $cc, 'sender' => $user, 'forward_text' => $forward_text);
         $q->execute($data);
         $error = $q->errorInfo();
         //TODO notify forward recipients by email
         if (!$error[1]) {
             $msg_subject = get_subject($dbh, $thread_id);
             $preview = snippet(20, $reply_text);
             foreach ($forward_tos as $f) {
                 if ($f != $user) {
                     $email = user_email($dbh, $f);
                     $subject = "ClinicCases: New Message: '" . $msg_subject . "'";
                     $body = username_to_fullname($dbh, $user) . " forwarded '" . $msg_subject . "' to you:\n\n'{$preview}'\n\n" . CC_EMAIL_FOOTER;
                     mail($email, $subject, $body, CC_EMAIL_HEADERS, "-f " . CC_EMAIL_FROM);
                 }
             }
         }
     }
     break;
 case 'star_on':
     //add start to message
     $q = $dbh->prepare("UPDATE cm_messages SET `starred` = REPLACE(`starred`,:user,''),\n\t\t\tstarred = CONCAT(starred,:user) WHERE id = :id");
示例#9
0
											<td>
											<select name="s_state">
											  <option value="">Select state</option>
											  <?php 
get_states($_POST["s_state"]);
?>
											</select>											</td>
										  </tr>
										  
										  <tr>
											<td class="gray-login">Subject</td>
											<td>
											<select name="s_subject">
											  <option value="">Select subject</option>
											  <?php 
get_subject($_POST["s_subject"]);
?>
											</select>											</td>
										  </tr>
										  
										  <tr>
											<td class="gray-login">Status</td>
											<td>
											 <select name="s_status">
											 	<option value="">Select status</option>
                                                <?php 
get_status($_POST["s_status"]);
?>
                                             </select>											</td>
										  </tr>
										  <tr>
示例#10
0
      <tr>
         <td align='center'>Grading Period:</td><td>
          <select id='g' style='width:190px;' name='g_period' required/>
         <option value=''>Select Grading Period</option>
            <option value ="1">1st Grading</option>
            <option value ="2">2nd Grading</option>
            <option value ="3">3rd Grading</option>
            <option value ="4">4th Grading</option>
          </select>
      </tr>
			<tr>
			   <td align='center'>Subject:</td><td>
          <select id='g' style='width:190px;' name='subject' required/>
			   <option value=''>Select Subject</option>
				<?php 
echo get_subject();
?>
					</select>
			</tr>
			<tr>
			   <td align='center'>Grade:</td><td><select id='g'name='grade' style='width:190px;' required/>
			   <option value=''>Grade</option>
			   <?php 
echo get_grade();
?>
       			   </select></td>
			</tr>

			<tr>
			   <td align='center'>Section:</td><td><select id='g'name='section' style='width:190;' required/>
			   <option value=''>Section</option>