/home/mip/www/vendor/laravel-filemanager/files/folder-1/821668/old-website.zip
PK 9@]�=�z�z �z class.smtp.phpnu �[��� <?php
/*~ class.smtp.php
.---------------------------------------------------------------------------.
| Software: PHPMailer - PHP email class |
| Version: 2.0.0 rc1 |
| Contact: via sourceforge.net support pages (also www.codeworxtech.com) |
| Info: http://phpmailer.sourceforge.net |
| Support: http://sourceforge.net/projects/phpmailer/ |
| ------------------------------------------------------------------------- |
| Author: Andy Prevost (project admininistrator) |
| Author: Brent R. Matzelle (original founder) |
| Copyright (c) 2004-2007, Andy Prevost. All Rights Reserved. |
| Copyright (c) 2001-2003, Brent R. Matzelle |
| ------------------------------------------------------------------------- |
| License: Distributed under the Lesser General Public License (LGPL) |
| http://www.gnu.org/copyleft/lesser.html |
| This program is distributed in the hope that it will be useful - WITHOUT |
| ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
| FITNESS FOR A PARTICULAR PURPOSE. |
| ------------------------------------------------------------------------- |
| We offer a number of paid services (www.codeworxtech.com): |
| - Web Hosting on highly optimized fast and secure servers |
| - Technology Consulting |
| - Oursourcing (highly qualified programmers and graphic designers) |
'---------------------------------------------------------------------------'
/**
* SMTP is rfc 821 compliant and implements all the rfc 821 SMTP
* commands except TURN which will always return a not implemented
* error. SMTP also provides some utility methods for sending mail
* to an SMTP server.
* @package PHPMailer
* @author Chris Ryan
*/
class SMTP
{
/**
* SMTP server port
* @var int
*/
var $SMTP_PORT = 25;
//var $SMTP_PORT = 587;
/**
* SMTP reply line ending
* @var string
*/
var $CRLF = "\r\n";
/**
* Sets whether debugging is turned on
* @var bool
*/
var $do_debug; # the level of debug to perform
/**
* Sets VERP use on/off (default is off)
* @var bool
*/
var $do_verp = false;
/**#@+
* @access private
*/
var $smtp_conn; # the socket to the server
var $error; # error if any on the last call
var $helo_rply; # the reply the server sent to us for HELO
/**#@-*/
/**
* Initialize the class so that the data is in a known state.
* @access public
* @return void
*/
function SMTP() {
$this->smtp_conn = 0;
$this->error = null;
$this->helo_rply = null;
$this->do_debug = 0;
}
/*************************************************************
* CONNECTION FUNCTIONS *
***********************************************************/
/**
* Connect to the server specified on the port specified.
* If the port is not specified use the default SMTP_PORT.
* If tval is specified then a connection will try and be
* established with the server for that number of seconds.
* If tval is not specified the default is 30 seconds to
* try on the connection.
*
* SMTP CODE SUCCESS: 220
* SMTP CODE FAILURE: 421
* @access public
* @return bool
*/
function Connect($host,$port=0,$tval=30) {
# set the error val to null so there is no confusion
$this->error = null;
# make sure we are __not__ connected
if($this->connected()) {
# ok we are connected! what should we do?
# for now we will just give an error saying we
# are already connected
$this->error = array("error" => "Already connected to a server");
return false;
}
if(empty($port)) {
$port = $this->SMTP_PORT;
}
#connect to the smtp server
$this->smtp_conn = fsockopen($host, # the host of the server
$port, # the port to use
$errno, # error number if any
$errstr, # error message if any
$tval); # give up after ? secs
# verify we connected properly
if(empty($this->smtp_conn)) {
$this->error = array("error" => "Failed to connect to server",
"errno" => $errno,
"errstr" => $errstr);
if($this->do_debug >= 1) {
echo "SMTP -> ERROR: " . $this->error["error"] .
": $errstr ($errno)" . $this->CRLF;
}
return false;
}
# sometimes the SMTP server takes a little longer to respond
# so we will give it a longer timeout for the first read
// Windows still does not have support for this timeout function
if(substr(PHP_OS, 0, 3) != "WIN")
socket_set_timeout($this->smtp_conn, $tval, 0);
# get any announcement stuff
$announce = $this->get_lines();
# set the timeout of any socket functions at 1/10 of a second
//if(function_exists("socket_set_timeout"))
// socket_set_timeout($this->smtp_conn, 0, 100000);
if($this->do_debug >= 2) {
echo "SMTP -> FROM SERVER:" . $this->CRLF . $announce;
}
return true;
}
/**
* Performs SMTP authentication. Must be run after running the
* Hello() method. Returns true if successfully authenticated.
* @access public
* @return bool
*/
function Authenticate($username, $password) {
// Start authentication
fputs($this->smtp_conn,"AUTH LOGIN" . $this->CRLF);
$rply = $this->get_lines();
$code = substr($rply,0,3);
if($code != 334) {
$this->error =
array("error" => "AUTH not accepted from server",
"smtp_code" => $code,
"smtp_msg" => substr($rply,4));
if($this->do_debug >= 1) {
echo "SMTP -> ERROR: " . $this->error["error"] .
": " . $rply . $this->CRLF;
}
return false;
}
// Send encoded username
fputs($this->smtp_conn, base64_encode($username) . $this->CRLF);
$rply = $this->get_lines();
$code = substr($rply,0,3);
if($code != 334) {
$this->error =
array("error" => "Username not accepted from server",
"smtp_code" => $code,
"smtp_msg" => substr($rply,4));
if($this->do_debug >= 1) {
echo "SMTP -> ERROR: " . $this->error["error"] .
": " . $rply . $this->CRLF;
}
return false;
}
// Send encoded password
fputs($this->smtp_conn, base64_encode($password) . $this->CRLF);
$rply = $this->get_lines();
$code = substr($rply,0,3);
if($code != 235) {
$this->error =
array("error" => "Password not accepted from server",
"smtp_code" => $code,
"smtp_msg" => substr($rply,4));
if($this->do_debug >= 1) {
echo "SMTP -> ERROR: " . $this->error["error"] .
": " . $rply . $this->CRLF;
}
return false;
}
return true;
}
/**
* Returns true if connected to a server otherwise false
* @access private
* @return bool
*/
function Connected() {
if(!empty($this->smtp_conn)) {
$sock_status = socket_get_status($this->smtp_conn);
if($sock_status["eof"]) {
# hmm this is an odd situation... the socket is
# valid but we are not connected anymore
if($this->do_debug >= 1) {
echo "SMTP -> NOTICE:" . $this->CRLF .
"EOF caught while checking if connected";
}
$this->Close();
return false;
}
return true; # everything looks good
}
return false;
}
/**
* Closes the socket and cleans up the state of the class.
* It is not considered good to use this function without
* first trying to use QUIT.
* @access public
* @return void
*/
function Close() {
$this->error = null; # so there is no confusion
$this->helo_rply = null;
if(!empty($this->smtp_conn)) {
# close the connection and cleanup
fclose($this->smtp_conn);
$this->smtp_conn = 0;
}
}
/***************************************************************
* SMTP COMMANDS *
*************************************************************/
/**
* Issues a data command and sends the msg_data to the server
* finializing the mail transaction. $msg_data is the message
* that is to be send with the headers. Each header needs to be
* on a single line followed by a <CRLF> with the message headers
* and the message body being seperated by and additional <CRLF>.
*
* Implements rfc 821: DATA <CRLF>
*
* SMTP CODE INTERMEDIATE: 354
* [data]
* <CRLF>.<CRLF>
* SMTP CODE SUCCESS: 250
* SMTP CODE FAILURE: 552,554,451,452
* SMTP CODE FAILURE: 451,554
* SMTP CODE ERROR : 500,501,503,421
* @access public
* @return bool
*/
function Data($msg_data) {
$this->error = null; # so no confusion is caused
if(!$this->connected()) {
$this->error = array(
"error" => "Called Data() without being connected");
return false;
}
fputs($this->smtp_conn,"DATA" . $this->CRLF);
$rply = $this->get_lines();
$code = substr($rply,0,3);
if($this->do_debug >= 2) {
echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply;
}
if($code != 354) {
$this->error =
array("error" => "DATA command not accepted from server",
"smtp_code" => $code,
"smtp_msg" => substr($rply,4));
if($this->do_debug >= 1) {
echo "SMTP -> ERROR: " . $this->error["error"] .
": " . $rply . $this->CRLF;
}
return false;
}
# the server is ready to accept data!
# according to rfc 821 we should not send more than 1000
# including the CRLF
# characters on a single line so we will break the data up
# into lines by \r and/or \n then if needed we will break
# each of those into smaller lines to fit within the limit.
# in addition we will be looking for lines that start with
# a period '.' and append and additional period '.' to that
# line. NOTE: this does not count towards are limit.
# normalize the line breaks so we know the explode works
$msg_data = str_replace("\r\n","\n",$msg_data);
$msg_data = str_replace("\r","\n",$msg_data);
$lines = explode("\n",$msg_data);
# we need to find a good way to determine is headers are
# in the msg_data or if it is a straight msg body
# currently I am assuming rfc 822 definitions of msg headers
# and if the first field of the first line (':' sperated)
# does not contain a space then it _should_ be a header
# and we can process all lines before a blank "" line as
# headers.
$field = substr($lines[0],0,strpos($lines[0],":"));
$in_headers = false;
if(!empty($field) && !strstr($field," ")) {
$in_headers = true;
}
$max_line_length = 998; # used below; set here for ease in change
while(list(,$line) = @each($lines)) {
$lines_out = null;
if($line == "" && $in_headers) {
$in_headers = false;
}
# ok we need to break this line up into several
# smaller lines
while(strlen($line) > $max_line_length) {
$pos = strrpos(substr($line,0,$max_line_length)," ");
# Patch to fix DOS attack
if(!$pos) {
$pos = $max_line_length - 1;
}
$lines_out[] = substr($line,0,$pos);
$line = substr($line,$pos + 1);
# if we are processing headers we need to
# add a LWSP-char to the front of the new line
# rfc 822 on long msg headers
if($in_headers) {
$line = "\t" . $line;
}
}
$lines_out[] = $line;
# now send the lines to the server
while(list(,$line_out) = @each($lines_out)) {
if(strlen($line_out) > 0)
{
if(substr($line_out, 0, 1) == ".") {
$line_out = "." . $line_out;
}
}
fputs($this->smtp_conn,$line_out . $this->CRLF);
}
}
# ok all the message data has been sent so lets get this
# over with aleady
fputs($this->smtp_conn, $this->CRLF . "." . $this->CRLF);
$rply = $this->get_lines();
$code = substr($rply,0,3);
if($this->do_debug >= 2) {
echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply;
}
if($code != 250) {
$this->error =
array("error" => "DATA not accepted from server",
"smtp_code" => $code,
"smtp_msg" => substr($rply,4));
if($this->do_debug >= 1) {
echo "SMTP -> ERROR: " . $this->error["error"] .
": " . $rply . $this->CRLF;
}
return false;
}
return true;
}
/**
* Expand takes the name and asks the server to list all the
* people who are members of the _list_. Expand will return
* back and array of the result or false if an error occurs.
* Each value in the array returned has the format of:
* [ <full-name> <sp> ] <path>
* The definition of <path> is defined in rfc 821
*
* Implements rfc 821: EXPN <SP> <string> <CRLF>
*
* SMTP CODE SUCCESS: 250
* SMTP CODE FAILURE: 550
* SMTP CODE ERROR : 500,501,502,504,421
* @access public
* @return string array
*/
function Expand($name) {
$this->error = null; # so no confusion is caused
if(!$this->connected()) {
$this->error = array(
"error" => "Called Expand() without being connected");
return false;
}
fputs($this->smtp_conn,"EXPN " . $name . $this->CRLF);
$rply = $this->get_lines();
$code = substr($rply,0,3);
if($this->do_debug >= 2) {
echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply;
}
if($code != 250) {
$this->error =
array("error" => "EXPN not accepted from server",
"smtp_code" => $code,
"smtp_msg" => substr($rply,4));
if($this->do_debug >= 1) {
echo "SMTP -> ERROR: " . $this->error["error"] .
": " . $rply . $this->CRLF;
}
return false;
}
# parse the reply and place in our array to return to user
$entries = explode($this->CRLF,$rply);
while(list(,$l) = @each($entries)) {
$list[] = substr($l,4);
}
return $list;
}
/**
* Sends the HELO command to the smtp server.
* This makes sure that we and the server are in
* the same known state.
*
* Implements from rfc 821: HELO <SP> <domain> <CRLF>
*
* SMTP CODE SUCCESS: 250
* SMTP CODE ERROR : 500, 501, 504, 421
* @access public
* @return bool
*/
function Hello($host="") {
$this->error = null; # so no confusion is caused
if(!$this->connected()) {
$this->error = array(
"error" => "Called Hello() without being connected");
return false;
}
# if a hostname for the HELO was not specified determine
# a suitable one to send
if(empty($host)) {
# we need to determine some sort of appopiate default
# to send to the server
$host = "localhost";
}
// Send extended hello first (RFC 2821)
if(!$this->SendHello("EHLO", $host))
{
if(!$this->SendHello("HELO", $host))
return false;
}
return true;
}
/**
* Sends a HELO/EHLO command.
* @access private
* @return bool
*/
function SendHello($hello, $host) {
fputs($this->smtp_conn, $hello . " " . $host . $this->CRLF);
$rply = $this->get_lines();
$code = substr($rply,0,3);
if($this->do_debug >= 2) {
echo "SMTP -> FROM SERVER: " . $this->CRLF . $rply;
}
if($code != 250) {
$this->error =
array("error" => $hello . " not accepted from server",
"smtp_code" => $code,
"smtp_msg" => substr($rply,4));
if($this->do_debug >= 1) {
echo "SMTP -> ERROR: " . $this->error["error"] .
": " . $rply . $this->CRLF;
}
return false;
}
$this->helo_rply = $rply;
return true;
}
/**
* Gets help information on the keyword specified. If the keyword
* is not specified then returns generic help, ussually contianing
* A list of keywords that help is available on. This function
* returns the results back to the user. It is up to the user to
* handle the returned data. If an error occurs then false is
* returned with $this->error set appropiately.
*
* Implements rfc 821: HELP [ <SP> <string> ] <CRLF>
*
* SMTP CODE SUCCESS: 211,214
* SMTP CODE ERROR : 500,501,502,504,421
* @access public
* @return string
*/
function Help($keyword="") {
$this->error = null; # to avoid confusion
if(!$this->connected()) {
$this->error = array(
"error" => "Called Help() without being connected");
return false;
}
$extra = "";
if(!empty($keyword)) {
$extra = " " . $keyword;
}
fputs($this->smtp_conn,"HELP" . $extra . $this->CRLF);
$rply = $this->get_lines();
$code = substr($rply,0,3);
if($this->do_debug >= 2) {
echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply;
}
if($code != 211 && $code != 214) {
$this->error =
array("error" => "HELP not accepted from server",
"smtp_code" => $code,
"smtp_msg" => substr($rply,4));
if($this->do_debug >= 1) {
echo "SMTP -> ERROR: " . $this->error["error"] .
": " . $rply . $this->CRLF;
}
return false;
}
return $rply;
}
/**
* Starts a mail transaction from the email address specified in
* $from. Returns true if successful or false otherwise. If True
* the mail transaction is started and then one or more Recipient
* commands may be called followed by a Data command.
*
* Implements rfc 821: MAIL <SP> FROM:<reverse-path> <CRLF>
*
* SMTP CODE SUCCESS: 250
* SMTP CODE SUCCESS: 552,451,452
* SMTP CODE SUCCESS: 500,501,421
* @access public
* @return bool
*/
function Mail($from) {
$this->error = null; # so no confusion is caused
if(!$this->connected()) {
$this->error = array(
"error" => "Called Mail() without being connected");
return false;
}
$useVerp = ($this->do_verp ? "XVERP" : "");
fputs($this->smtp_conn,"MAIL FROM:<" . $from . ">" . $useVerp . $this->CRLF);
$rply = $this->get_lines();
$code = substr($rply,0,3);
if($this->do_debug >= 2) {
echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply;
}
if($code != 250) {
$this->error =
array("error" => "MAIL not accepted from server",
"smtp_code" => $code,
"smtp_msg" => substr($rply,4));
if($this->do_debug >= 1) {
echo "SMTP -> ERROR: " . $this->error["error"] .
": " . $rply . $this->CRLF;
}
return false;
}
return true;
}
/**
* Sends the command NOOP to the SMTP server.
*
* Implements from rfc 821: NOOP <CRLF>
*
* SMTP CODE SUCCESS: 250
* SMTP CODE ERROR : 500, 421
* @access public
* @return bool
*/
function Noop() {
$this->error = null; # so no confusion is caused
if(!$this->connected()) {
$this->error = array(
"error" => "Called Noop() without being connected");
return false;
}
fputs($this->smtp_conn,"NOOP" . $this->CRLF);
$rply = $this->get_lines();
$code = substr($rply,0,3);
if($this->do_debug >= 2) {
echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply;
}
if($code != 250) {
$this->error =
array("error" => "NOOP not accepted from server",
"smtp_code" => $code,
"smtp_msg" => substr($rply,4));
if($this->do_debug >= 1) {
echo "SMTP -> ERROR: " . $this->error["error"] .
": " . $rply . $this->CRLF;
}
return false;
}
return true;
}
/**
* Sends the quit command to the server and then closes the socket
* if there is no error or the $close_on_error argument is true.
*
* Implements from rfc 821: QUIT <CRLF>
*
* SMTP CODE SUCCESS: 221
* SMTP CODE ERROR : 500
* @access public
* @return bool
*/
function Quit($close_on_error=true) {
$this->error = null; # so there is no confusion
if(!$this->connected()) {
$this->error = array(
"error" => "Called Quit() without being connected");
return false;
}
# send the quit command to the server
fputs($this->smtp_conn,"quit" . $this->CRLF);
# get any good-bye messages
$byemsg = $this->get_lines();
if($this->do_debug >= 2) {
echo "SMTP -> FROM SERVER:" . $this->CRLF . $byemsg;
}
$rval = true;
$e = null;
$code = substr($byemsg,0,3);
if($code != 221) {
# use e as a tmp var cause Close will overwrite $this->error
$e = array("error" => "SMTP server rejected quit command",
"smtp_code" => $code,
"smtp_rply" => substr($byemsg,4));
$rval = false;
if($this->do_debug >= 1) {
echo "SMTP -> ERROR: " . $e["error"] . ": " .
$byemsg . $this->CRLF;
}
}
if(empty($e) || $close_on_error) {
$this->Close();
}
return $rval;
}
/**
* Sends the command RCPT to the SMTP server with the TO: argument of $to.
* Returns true if the recipient was accepted false if it was rejected.
*
* Implements from rfc 821: RCPT <SP> TO:<forward-path> <CRLF>
*
* SMTP CODE SUCCESS: 250,251
* SMTP CODE FAILURE: 550,551,552,553,450,451,452
* SMTP CODE ERROR : 500,501,503,421
* @access public
* @return bool
*/
function Recipient($to) {
$this->error = null; # so no confusion is caused
if(!$this->connected()) {
$this->error = array(
"error" => "Called Recipient() without being connected");
return false;
}
fputs($this->smtp_conn,"RCPT TO:<" . $to . ">" . $this->CRLF);
$rply = $this->get_lines();
$code = substr($rply,0,3);
if($this->do_debug >= 2) {
echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply;
}
if($code != 250 && $code != 251) {
$this->error =
array("error" => "RCPT not accepted from server",
"smtp_code" => $code,
"smtp_msg" => substr($rply,4));
if($this->do_debug >= 1) {
echo "SMTP -> ERROR: " . $this->error["error"] .
": " . $rply . $this->CRLF;
}
return false;
}
return true;
}
/**
* Sends the RSET command to abort and transaction that is
* currently in progress. Returns true if successful false
* otherwise.
*
* Implements rfc 821: RSET <CRLF>
*
* SMTP CODE SUCCESS: 250
* SMTP CODE ERROR : 500,501,504,421
* @access public
* @return bool
*/
function Reset() {
$this->error = null; # so no confusion is caused
if(!$this->connected()) {
$this->error = array(
"error" => "Called Reset() without being connected");
return false;
}
fputs($this->smtp_conn,"RSET" . $this->CRLF);
$rply = $this->get_lines();
$code = substr($rply,0,3);
if($this->do_debug >= 2) {
echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply;
}
if($code != 250) {
$this->error =
array("error" => "RSET failed",
"smtp_code" => $code,
"smtp_msg" => substr($rply,4));
if($this->do_debug >= 1) {
echo "SMTP -> ERROR: " . $this->error["error"] .
": " . $rply . $this->CRLF;
}
return false;
}
return true;
}
/**
* Starts a mail transaction from the email address specified in
* $from. Returns true if successful or false otherwise. If True
* the mail transaction is started and then one or more Recipient
* commands may be called followed by a Data command. This command
* will send the message to the users terminal if they are logged
* in.
*
* Implements rfc 821: SEND <SP> FROM:<reverse-path> <CRLF>
*
* SMTP CODE SUCCESS: 250
* SMTP CODE SUCCESS: 552,451,452
* SMTP CODE SUCCESS: 500,501,502,421
* @access public
* @return bool
*/
function Send($from) {
$this->error = null; # so no confusion is caused
if(!$this->connected()) {
$this->error = array(
"error" => "Called Send() without being connected");
return false;
}
fputs($this->smtp_conn,"SEND FROM:" . $from . $this->CRLF);
$rply = $this->get_lines();
$code = substr($rply,0,3);
if($this->do_debug >= 2) {
echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply;
}
if($code != 250) {
$this->error =
array("error" => "SEND not accepted from server",
"smtp_code" => $code,
"smtp_msg" => substr($rply,4));
if($this->do_debug >= 1) {
echo "SMTP -> ERROR: " . $this->error["error"] .
": " . $rply . $this->CRLF;
}
return false;
}
return true;
}
/**
* Starts a mail transaction from the email address specified in
* $from. Returns true if successful or false otherwise. If True
* the mail transaction is started and then one or more Recipient
* commands may be called followed by a Data command. This command
* will send the message to the users terminal if they are logged
* in and send them an email.
*
* Implements rfc 821: SAML <SP> FROM:<reverse-path> <CRLF>
*
* SMTP CODE SUCCESS: 250
* SMTP CODE SUCCESS: 552,451,452
* SMTP CODE SUCCESS: 500,501,502,421
* @access public
* @return bool
*/
function SendAndMail($from) {
$this->error = null; # so no confusion is caused
if(!$this->connected()) {
$this->error = array(
"error" => "Called SendAndMail() without being connected");
return false;
}
fputs($this->smtp_conn,"SAML FROM:" . $from . $this->CRLF);
$rply = $this->get_lines();
$code = substr($rply,0,3);
if($this->do_debug >= 2) {
echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply;
}
if($code != 250) {
$this->error =
array("error" => "SAML not accepted from server",
"smtp_code" => $code,
"smtp_msg" => substr($rply,4));
if($this->do_debug >= 1) {
echo "SMTP -> ERROR: " . $this->error["error"] .
": " . $rply . $this->CRLF;
}
return false;
}
return true;
}
/**
* Starts a mail transaction from the email address specified in
* $from. Returns true if successful or false otherwise. If True
* the mail transaction is started and then one or more Recipient
* commands may be called followed by a Data command. This command
* will send the message to the users terminal if they are logged
* in or mail it to them if they are not.
*
* Implements rfc 821: SOML <SP> FROM:<reverse-path> <CRLF>
*
* SMTP CODE SUCCESS: 250
* SMTP CODE SUCCESS: 552,451,452
* SMTP CODE SUCCESS: 500,501,502,421
* @access public
* @return bool
*/
function SendOrMail($from) {
$this->error = null; # so no confusion is caused
if(!$this->connected()) {
$this->error = array(
"error" => "Called SendOrMail() without being connected");
return false;
}
fputs($this->smtp_conn,"SOML FROM:" . $from . $this->CRLF);
$rply = $this->get_lines();
$code = substr($rply,0,3);
if($this->do_debug >= 2) {
echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply;
}
if($code != 250) {
$this->error =
array("error" => "SOML not accepted from server",
"smtp_code" => $code,
"smtp_msg" => substr($rply,4));
if($this->do_debug >= 1) {
echo "SMTP -> ERROR: " . $this->error["error"] .
": " . $rply . $this->CRLF;
}
return false;
}
return true;
}
/**
* This is an optional command for SMTP that this class does not
* support. This method is here to make the RFC821 Definition
* complete for this class and __may__ be implimented in the future
*
* Implements from rfc 821: TURN <CRLF>
*
* SMTP CODE SUCCESS: 250
* SMTP CODE FAILURE: 502
* SMTP CODE ERROR : 500, 503
* @access public
* @return bool
*/
function Turn() {
$this->error = array("error" => "This method, TURN, of the SMTP ".
"is not implemented");
if($this->do_debug >= 1) {
echo "SMTP -> NOTICE: " . $this->error["error"] . $this->CRLF;
}
return false;
}
/**
* Verifies that the name is recognized by the server.
* Returns false if the name could not be verified otherwise
* the response from the server is returned.
*
* Implements rfc 821: VRFY <SP> <string> <CRLF>
*
* SMTP CODE SUCCESS: 250,251
* SMTP CODE FAILURE: 550,551,553
* SMTP CODE ERROR : 500,501,502,421
* @access public
* @return int
*/
function Verify($name) {
$this->error = null; # so no confusion is caused
if(!$this->connected()) {
$this->error = array(
"error" => "Called Verify() without being connected");
return false;
}
fputs($this->smtp_conn,"VRFY " . $name . $this->CRLF);
$rply = $this->get_lines();
$code = substr($rply,0,3);
if($this->do_debug >= 2) {
echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply;
}
if($code != 250 && $code != 251) {
$this->error =
array("error" => "VRFY failed on name '$name'",
"smtp_code" => $code,
"smtp_msg" => substr($rply,4));
if($this->do_debug >= 1) {
echo "SMTP -> ERROR: " . $this->error["error"] .
": " . $rply . $this->CRLF;
}
return false;
}
return $rply;
}
/*******************************************************************
* INTERNAL FUNCTIONS *
******************************************************************/
/**
* Read in as many lines as possible
* either before eof or socket timeout occurs on the operation.
* With SMTP we can tell if we have more lines to read if the
* 4th character is '-' symbol. If it is a space then we don't
* need to read anything else.
* @access private
* @return string
*/
function get_lines() {
$data = "";
while($str = @fgets($this->smtp_conn,515)) {
if($this->do_debug >= 4) {
echo "SMTP -> get_lines(): \$data was \"$data\"" .
$this->CRLF;
echo "SMTP -> get_lines(): \$str is \"$str\"" .
$this->CRLF;
}
$data .= $str;
if($this->do_debug >= 4) {
echo "SMTP -> get_lines(): \$data is \"$data\"" . $this->CRLF;
}
# if the 4th character is a space then we are done reading
# so just break the loop
if(substr($str,3,1) == " ") { break; }
}
return $data;
}
}
?>PK 9@]ɉ��;1 ;1 send_application.phpnu �[��� <?php
require_once("func_proc.php");
$today = date("M d, Y");
$bday = "$bday_year-$bday_month-$bday_day";
$spouse_bday = "$sbday_year-$sbday_month-$sbday_day";
$pp_date = "$pp_year-$pp_month-$pp_day";
/* for ftp */
if($picture){ $pic_name = basename($picture_name);
$filename = $dir.$pic_name;
copy ($picture, $filename);
}
/* for local
if($picture){ $pic_name = basename($picture_name);
$filename = $dir.$pic_name;
copy ($picture, $filename);
}
*/
//echo "$filename";
//exit;
$message="
<html>
<head>
<style type='text/css'>
<!--
td { font-family: verdana, arial, Helvetica, sans-serif; font-size:11px;}
-->
</style>
</head>
<body>
<table border=0 width=100% >
<tr><td height='100%' align=center valign='top'>
<table align=center cellpadding='0' cellspacing='0' border=0 width='98%' ><br>
<tr><td align=center bgcolor='#cccccc'>
<table border='0' cellpadding='1' cellspacing='1' width='100%' >
<tr align=left bgcolor=#f1f1f1>
<td colspan=4 align='right'><img src='http://mipinternational.com/pictures/".$pic_name."'></td>
<!--<td colspan=4 align='right'><img src='http://mipinternational.com/pictures/".$pic_name."'></td>-->
</tr>
<tr align=left bgcolor='f1f1f1'>
<td><b>Date of Application :</td>
<td colspan=3>$today</td>
</tr>
<tr align=left bgcolor=#f1f1f1>
<td><b>Position Applied for :</b></td>
<td colspan=3>".$position."</td>
</tr>
<tr align=left bgcolor=#f1f1f1>
<td><b>Country Applied for :</b></td>
<td colspan=3>".$country."</td>
</tr>
<tr align=left bgcolor=#f1f1f1>
<td><b>Last Name :</b></td>
<td colspan=3>".$requiredlastname."</td>
</tr>
<tr align=left bgcolor=#f1f1f1>
<td><b>First Name :</b></td>
<td colspan=3>".$requiredfirstname."</td>
</tr>
<tr align=left bgcolor=#f1f1f1>
<td><b>Middle :</b></td>
<td colspan=3>".$mname."</td>
</tr>
<tr align=left bgcolor=#f1f1f1>
<td><b>Email Address :</b></td>
<td colspan=3>".$email."</td>
</tr>
<tr align=left bgcolor=#f1f1f1>
<td><b>City Address :</b></td>
<td colspan=3>".$address1."</td>
</tr>
<tr align=left bgcolor=#f1f1f1>
<td><b>Tel. No. :</b></td>
<td colspan=3>".$telephone1."</td>
</tr>
<tr align=left bgcolor=#f1f1f1>
<td><b>Mobile No. :</b></td>
<td colspan=3>".$mobileno."</td>
</tr>
<tr align=left bgcolor=#f1f1f1>
<td><b>Provincial Address :</b></td>
<td colspan=3>".$address2."</td>
</tr>
<tr align=left bgcolor=#f1f1f1>
<td><b>Tel. No. :</b></td>
<td colspan=3>".$telephone2."</td>
</tr>
<tr align=left bgcolor=#f1f1f1>
<td width=20% ><b>Date of Birth :</b></td>
<td width=30% >".dateformat($bday)."</td>
<td width=15% ><b>Place :</b></td>
<td width=35% >".$birthplace."</td>
</tr>
<tr align=left bgcolor=#f1f1f1>
<td><b>Sex :</b></td>
<td>".$sex."</td>
<td><b>Civil Status :</b></td>
<td>".$civil_status."</td>
</tr>
<tr align=left bgcolor=#f1f1f1>
<td><b>Height :</b></td>
<td>".stripslashes($height1)." ".$height2."</td>
<td><b>Weight :</b></td>
<td>".$weight1." ".$weight2."</td>
</tr>
<tr align=left bgcolor=#f1f1f1>
<td><b>Nationality :</b></td>
<td>".$nationality."</td>
<td><b>Religion :</b></td>
<td>".$religion."</td>
</tr>
</table>
<table border=0 cellpadding='1' cellspacing='1' width=100% >
<tr align=left bgcolor='f1f1f1' height=25>
<td colspan=4><b>EDUCATIONAL ATTAINMENT</td>
</tr>
<tr align=left bgcolor='f1f1f1' height=25>
<td colspan=4 bgcolor=cccccc>
<table width=100% >
<tr bgcolor='f1f1f1'>
<td></td>
<td align=center>Name of School/Address</td>
<td align=center>Year Attended<br>From - To</td>
<td align=center>Course Finished</td>
</tr>
<tr bgcolor='f1f1f1'>
<td valign=top>College:</td>
<td valign=top>".$college_school."</td>
<td valign=top align=center>$college_from_year - $college_to_year</td>
<td valign=top>".$college_course."</td>
</tr>
<tr bgcolor='f1f1f1'>
<td valign=top>Secondary:</td>
<td valign=top>".$secondary_school."</td>
<td valign=top align=center>$secondary_from_year - $secondary_to_year</td>
<td valign=top>".$secondary_course."</td>
</tr>
<tr bgcolor='f1f1f1'>
<td valign=top>Primary:</td>
<td valign=top>".$primary_school."</td>
<td valign=top align=center>$primary_from_year - $primary_to_year</td>
<td valign=top>".$primary_course."</td>
</tr>
<tr bgcolor='f1f1f1'>
<td>Other:</td>
<td>".$other_school."</td>
<td align=center>$other_from_year - $other_to_year</td>
<td>".$other_course."</td>
</tr>
</table>
</td>
</tr>
<tr align=left bgcolor='f1f1f1' height=25>
<td colspan=4><b>SEMINAR ATTENDED</td>
</tr>
<tr align=left bgcolor='f1f1f1'>
<td colspan=4 bgcolor=cccccc>
<table width=100% border=0 cellpadding=0>
<tr bgcolor='f1f1f1'>
<td align=center>Nature of Seminar</td>
<td align=center colspan=2>Inclusive Dates</td>
</tr>
<tr bgcolor='f1f1f1'>
<td align=center width=50% ></td>
<td align=center width=25% >From</td>
<td align=center width=25% >To</td>
</tr>
<tr bgcolor='f1f1f1'>
<td valign=top>1. ".$seminar1_nature."</td>
<td valign=top align=center>".$seminar1_from."</td>
<td valign=top align=center>".$seminar1_to."</td>
</tr>
<tr bgcolor='f1f1f1'>
<td valign=top>2. ".$seminar2_nature."</td>
<td valign=top align=center>".$seminar2_from."</td>
<td valign=top align=center>".$seminar2_to."</td>
</tr>
</table>
</td>
</tr>
<tr align=left bgcolor='f1f1f1' height=25>
<td colspan=4><b>WORK EXPERIENCES</td>
</tr>
<tr align=left bgcolor='f1f1f1' height=25>
<td colspan=4 bgcolor='cccccc'>
<table width=100%>
<tr bgcolor='f1f1f1'>
<td align=center rowspan=2>Name of Company</td>
<td align=center rowspan=2>Position</td>
<td align=center colspan=2>Period</td>
</tr>
<tr bgcolor='f1f1f1'>
<td align=center>From</td>
<td align=center>To</td>
</tr>
<tr bgcolor='f1f1f1'>
<td valign=top>1. ".$company1."</td>
<td valign=top>".$company1_position."</td>
<td valign=top align=center>".$company1_from."</td>
<td valign=top align=center>".$company1_to."</td>
</tr>
<tr bgcolor='f1f1f1'><td colspan=4>
<table width=100%><tr>
<td>Duties & Responsibilities</td><td>: ".$company1_duties."</td>
<td>Projects Undertaken</td><td>: ".$company1_projects."</td></tr>
</table>
</td></tr>
<tr bgcolor='f1f1f1'>
<td valign=top>2. ".$company2."</td>
<td valign=top>".$company2_position."</td>
<td valign=top align=center>".$company2_from."</td>
<td valign=top align=center>".$company2_to."</td>
</tr>
<tr bgcolor='f1f1f1'><td colspan=4>
<table width=100%><tr>
<td>Duties & Responsibilities</td><td>: ".$company1_duties."</td>
<td>Projects Undertaken</td><td>: ".$company1_projects."</td></tr>
</table>
</td></tr>
<tr bgcolor='f1f1f1'>
<td valign=top>3. ".$company3."</td>
<td valign=top>".$company3_position."</td>
<td valign=top align=center>".$company3_from."</td>
<td valign=top align=center>".$company3_to."</td>
</tr>
<tr bgcolor='f1f1f1'><td colspan=4>
<table width=100%><tr>
<td>Duties & Responsibilities</td><td>: ".$company1_duties."</td>
<td>Projects Undertaken</td><td>: ".$company1_projects."</td></tr>
</table>
</td></tr>
<tr bgcolor='f1f1f1'>
<td valign=top>4. ".$company4."</td>
<td valign=top>".$company4_position."</td>
<td valign=top align=center>".$company4_from."</td>
<td valign=top align=center>".$company4_to."</td>
</tr>
<tr bgcolor='f1f1f1'><td colspan=4>
<table width='100%'><tr>
<td>Duties & Responsibilities</td><td>: ".$company1_duties."</td>
<td>Projects Undertaken</td><td>: ".$company1_projects."</td></tr>
</table>
</td></tr>
</table>
</td>
</tr>
<tr align=left bgcolor='f1f1f1' height='25'>
<td><b>Specialized Skill :</b></td>
<td>".$specialized_skill."</td>
<td><b>Other Skill :</b></td>
<td>".$other_skill."</td>
</tr>
<tr align=left height=25 bgcolor=f1f1f1>
<td colspan=4><b>REFERENCES</td>
</tr>
<tr align='left' bgcolor='#f1f1f1' height='25'>
<td colspan='4' bgcolor='#cccccc'>
<table width= 100%>
<tr bgcolor='#f1f1f1'>
<td align=center width='30%'>Names</td>
<td align=center width='35%'>Address/Tel. No.</td>
<td align=center width='35%'>Occupation/Relationship</td>
</tr>
<tr bgcolor='f1f1f1'>
<td>1. ".$reference1."</td>
<td>".$reference1_address."</td>
<td>".$reference1_occupation."</td>
</tr>
<tr bgcolor='f1f1f1'>
<td>2. ".$reference2."</td>
<td>".$reference2_address."</td>
<td>".$reference2_occupation."</td>
</tr>
</table>
</td>
</tr>
<tr bgcolor='f1f1f1' height=25>
<td colspan=4></td>
</tr>
</table>
</td></tr>
</table><br>
</td></tr>
</table>
</body>
</html>";
//print "$message";
//exit;
/* To send HTML mail, you can set the Content-type header. */
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
/* additional headers */
$headers .= "From: MIP International\r\n";
//$headers .= "From: mailman@jedegalmanpower.com\r\n";
$to="$email_job";
$subject="Someone has applied online.";
$result = mail($to, $subject, $message, $headers);
?>
<?php
//require all the functions to be used.
require_once("func_all.php");
do_html_header(); //header.
do_menu();
?>
<style type="text/css">
<!--
.style2 {
font-family: Arial, Helvetica, sans-serif;
font-weight: bold;
}
.style3 {color: #FFFFFF}
-->
</style>
<div align="left">
<table width="100%" border="0" cellpadding="0" cellspacing="0" background="images/bg.jpg">
<tr>
<td align="left" valign="top"> </td>
<td valign="bottom"> </td>
<td> </td>
</tr>
<tr>
<td colspan="3" valign="top" align="center">
<!-- text -->
<!-- form -->
<table width="530" cellpadding="1" cellspacing="1" border="0">
<tr class=black>
<td width="540" align="center" valign="middle">
<table width="100%" border="0" cellspacing="0" cellpadding="0" id="middle" style="background-position:top ">
<tr>
<td align="center">
<br><br><br>
<span class="style8 style2 style3">" Thank you for Applaying Online! <br>
Your Application was Successfully sent to MIP International. "</span>
<span class="style2"><br>
</span><br>
<br> </td>
</tr>
</table>
</td>
</tr></table>
<!-- end form -->
<!-- end text -->
</td>
</table>
<?
do_footer();
?>
<script>
setTimeout("window.location='<?=$_SERVER['HTTP_REFERER']?>'",1250);
</script>
PK 9@]�ÝN N announcements_allxx.phpnu �[��� <? require_once("func_proc.php");
do_header("Announcement"); //header.
do_menu();
$sqltoday = date("Y-m-d");
$ann = getdata("select * from web_announcements where status = 'Published' and posting_date <= '$sqltoday' order by posting_date desc");
$num_ann = count($ann);
if(!$id)$id = $ann[1][id];
$ann1 = getdata_one("*","web_announcements","id",$id);
$cols = 3;
$num = get_numpercol($num_ann,$cols);
?>
<style type="text/css">
<!--
.style3 { font-size: 11px;
font-family: Arial, Helvetica, sans-serif;
color: #FFFFFF;
}
.style8 { font-family: "Myriad Pro";
font-size: 12px;
color: #CCCCCC;
}
-->
</style>
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<th scope="col"><div align="left" style="padding:20px;"><img src="images/announce.gif" width="199" height="22" /></div></th>
</tr>
<tr>
<th align="center" scope="col"><img src="images/separator1.jpg" width="492" height="23" /></th>
</tr>
<tr>
<td align="center" scope="col"><table width="491" height="44" border="0">
<ul type="circle">
<? for($i=1;$i<=$num_ann;$i++){ ?>
<tr>
<td width="576" height="40" align="left" style="padding-bottom:10px; padding-left:10px;"><table width="476" border="0" cellspacing="0" cellpadding="0">
<tr>
<th width="21" height="26" scope="col"><img src="images/b_let.jpg" width="9" height="10" /></th>
<td width="455" rowspan="2" scope="col" class="style3"><a href="view_announcement.php?event_id=<?=$ann[$i]['id']?>">
<?=dateformat1($ann[$i]['posting_date'],"M d, Y")?>
<br />
<b> <?=$ann[$i]['title']?></b>
<br />
<?=substr($ann[$i]['announcement'],0,75)?>
</a></td>
</tr>
<tr>
<th scope="col"> </th>
</tr>
</table></td>
</tr>
<? } if($num_ann>=2){?>
<? } ?>
</ul>
</table></td>
</tr>
</table>
<!--call do_leftContent-->
<!--RIGHT CONTAINER-->
<? do_footer();?>
PK 9@]�+��o o func_data_validation_.phpnu �[��� <?
function JS_CheckRequired($myform,$textarray,$displayname="0",$email="0",$email2="0"){
if($displayname=="0")$displayname=$textarray;
?>
<SCRIPT LANGUAGE="JavaScript1.2">
function PHP_hasValue(obj, obj_type)
{
if (obj_type == "TEXT" || obj_type == "PASSWORD") {
if (obj.value.length == 0)
return false;
else
return true;
}
}
function CheckRequired(){
<? for ($i=0;$i< count($textarray);$i++){ ?>
if (!PHP_hasValue(<?echo$myform?>.<?echo$textarray[$i]?>, "TEXT" )){
alert("Notice: <?echo$displayname[$i]?> is a required field.");
<?echo$myform?>.<?echo$textarray[$i]?>.focus();
return false;
}
<? } ?>
<?if(!$email=="0"){?>
if (isEmail(<?echo$myform?>.<?echo$email?>.value) == false) {
alert("Please enter your valid email address.");
<?echo$myform?>.<?echo$email?>.focus();
return false;
}
<?}?>
<?if(!$email2=="0"){?>
if (isEmail(<?echo$myform?>.<?echo$email2?>.value) == false) {
alert("Please enter your friend's valid email address.");
<?echo$myform?>.<?echo$email2?>.focus();
return false;
}
<?}?>
}
</script>
<script type="text/javascript" language="JavaScript1.2"><!--
function isEmail(string) {
if (string.search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/) != -1)
return true;
else
return false;
}
//--></script>
<?}
?>
PK 9@]���
config.phpnu �[��� <?
$db_host="localhost";
$db_name="mip_mipdb";
$db_username="mip_mipdb";
$db_password="mipdb";
$educ= array("Elementary", "Secondary", "Vocational", "Training/Seminar", "College/University", "Post Graduate", "Licentiate");
$pic_dir= "irisonlinex/pictures/";
$pic_dir1="irisonlinex/pictures/";
$doc_dir="irisonlinex/documents/";
$doc_rootdir="irisonlinex/documents/";
$sqltoday = date ("Y-m-d");
$site_title = "MIP International Manpower Services";
$contact_email = "contact@sampleco.com";
$employer_email = "contact@sampleco.com";
$url = "http://mipinternational.com/";
$smtphost="mail.ofwguide.com";
$smtpusername="iris@ofwguide.com";
$smtpassword="iris";
$smtpport="587";
$diskspace = '3'; //GB
$urliris = "http://mipinternational.com/irisonline_new/"; //for iris url
$agency_id="2080";
$postjob_url="http://www.workabroad.ph/irisonline/";
$website_url="mipinternational.com";
$viewadd = "http://www.workabroad.ph/report_job_listing.php";
/*live*/
$tokenrequestsite = "http://www.workabroad.ph/irisonline/oauth/index.php/";
$tokencallbacksite = "http://mipinternational.com/irisonline/";
$site_urlWA = "http://mipinternational.com/irisonline/";
//live
$iriskey = "key";
$iriskeysecret = "secret";
$iriskeytoken = "6930d20279e009622ce9247c4febaf6e332a4d63";
$iriskeytokensecret = "1d27bed46cf293653513a6a818d03448324716ac";
$norecordsaying = "No Record";
/*for WA integration*/
foreach($_POST as $key => $val) {
$$key=$val;
}
foreach($_GET as $key => $val) {
$$key=$val;
}
foreach($_REQUEST as $key => $val) {
$$key=$val;
}
?>
PK 9@]��W� � apply.cssnu �[��� select { font-family: verdana, arial, Helvetica, sans-serif; font-size:11px;}
input {font-family:verdana, arial; font-size:11px; text-decoration:none;}
table.jobs1 {BORDER-BOTTOM:#C89B04 1px solid; BORDER-LEFT:#C89B04 1px solid; BORDER-RIGHT:#C89B04 1px solid; BORDER-TOP:#C89B04 1px solid; }
.applyonline { font-family: verdana, arial, Helvetica, sans-serif; font-size:11px; color:#FFFFFF;}
a:link, a:active, a:visited {font-family:verdana, arial; color:#ffffff; font-size:11px; text-decoration:none;}
a:hover {font-family:verdana, arial; color:#ffffff; font-size:11px; text-decoration:underline;}
a.mainmenu:link, a.mainmenu:active, a.mainmenu:visited {font-family:verdana, arial; color:#ffffff; font-size:11px; text-decoration:none; font-weight:bold;}
a.mainmenu:hover {font-family:verdana, arial; color:#ffffff; font-size:11px; text-decoration:underline; font-weight:bold;}PK 9@]�A/� � index.phpnu �[��� <?php
require_once("func_proc.php");
do_header("Main Page"); //header.
do_menu();
?>
<table width="100%" border="0" cellpadding="0" cellspacing="0" background="images/bg.jpg">
<!--DWLayoutTable-->
<tr>
<td height="36" colspan="4" valign="top" style="padding-left:10px;"><img src="images/welcome.gif" width="320" height="24" /></td>
</tr>
<tr>
<td width="189" height="131" align="center"><img src="images/img1.jpg" width="156" height="114" /></td>
<td width="414" colspan="3"><p class="style4"><strong>MIP International Manpower Services</strong> is committed to the principle of partnership for human and economic development.</p>
<p><span class="style4">To achieve this end, MIP International Manpower Services is dedicated to enlist an overseas employment workforce that amply addresses the specifications of our foreign principals</span>.</p></td>
</tr>
</table>
<?
do_rightContent();
?>
<? do_footer();?>PK 9@]�F�%H H diskspacecrm.phpnu �[��� <?php
$file = file_get_contents("diskspacewritecrm.php");
echo $file;
?>PK 9@]�6�b b func_select_codes.phpnu �[��� <?
/* List of functions that make select for the dates. */
function selectcodemonth($array1,$val) {
foreach($array1 as $value){
if($value==$val) echo "<option value='$value' selected>".date("F",mktime(0,0,0,$value+1,0,0))."";
else echo "<option value='$value'>".date("F",mktime(0,0,0,$value+1,0,0))."";
}
echo "</select>";
}// end of function
function datebox($name,$val,$formname,$month,$day,$year) {
list ($year1, $month1, $day1) = split ('[-]', $val);
$code = "<input type=text name='$name' value='".convertToTextDate($val)."' size='11' maxlength='10'
onFocus=\"javascript:vDateType='1'\" onKeyUp=\"DateFormat(this,this.value,event,false,'1')\" onBlur=\"DateFormat(this,this.value,event,true,'1')\" onchange=\"splitDate(this,this.value,document.$formname.$month,document.$formname.$day,document.$formname.$year)\">
<font size=1>(MM/DD/YYYY)</font>";
$code.="<input type=hidden name='$month' value='$month1'>
<input type=hidden name='$day' value='$day1'>
<input type=hidden name='$year' value='$year1'>
";
return $code;
break;
}// end of function dateselect()
function dateselect($name,$date,$val,$from,$to,$noday=0,$nolegend=0) {
switch ($date){
case "month" :
if($val == '00') $val = '';
$code = "<input id='$name' type=text name='$name' id='$name' value='$val' size=2 maxlength=2 onKeyUp=\"return autoTab(this, 2, event);\" onfocus='select()' onkeypress=\"return isNumberKey(event);\">/";
return $code;
break;
case "day" :
if($val == '00') $val = '';
$code = "<input id='$name' type=text name='$name' id='$name' value='$val' size=2 maxlength=2 onKeyUp=\"return autoTab(this, 2, event);\" onfocus='select()' onkeypress=\"return isNumberKey(event);\">/";
return $code;
break;
case "year" :
if($noday) $com = "(MM/YYYY)";
else$com = "(MM/DD/YYYY)";
if($nolegend) $com ="";
if($val == '0000') $val = '';
$code = "<input id='$name' type=text name='$name' id='$name' value='$val' size=4 maxlength=4 onfocus='select()' onkeypress=\"return isNumberKey(event);\"><font size=1>$com</font>";
return $code;
break;
}// end of switch statement
}// end of function dateselect()
function dateselect1($name,$date,$val,$from,$to) {
switch ($date){
case "month" : $code = "<select name='$name'>";
$code.= "<option value=''>MM";
$months=array(1=>Jan,2=>Feb,3=>Mar,4=>April,5=>May,6=>June,7=>July,8=>Aug,9=>Sept,10=>Oct,11=>Nov,12=>Dec);
foreach ($months as $key => $value){
$key = str_pad($key, 2, "0", STR_PAD_LEFT);
if($val == "$key"){ $code.= "<option value='$key' selected>$value"; }
else $code.= "<option value='$key'>$value";
}
$code.= "</select>";
return $code;
break;
case "day" : $code = "<select name='$name'>";
$code.= "<option value=''>DD";
for ($i=1; $i<=31; $i++){
$i = str_pad($i, 2, "0", STR_PAD_LEFT);
if($val == "$i"){ $code.= "<option value='$i' selected>$i"; }
else $code.= "<option value='$i'>$i";
}
$code.= "</select>";
return $code;
break;
case "year" : $code = "<select name='$name'>";
$code.= "<option value=''>YYYY";
$from_this_year = date("Y")-$from; // set the year with respect to the current year
$to_this_year = date("Y")+ $to;
if($val < $from_this_year && $val != 0){
$diff = $from_this_year - $val ;
$from_this_year = $from_this_year - $diff;
}
for ($i=$to_this_year; $i>=$from_this_year; $i--){
if($val == $i){ $code.= "<option value=$i selected>$i"; }
else $code.= "<option value=$i>$i";
}
$code.= "</select>";
return $code;
break;
}// end of switch statement
}// end of function dateselect()
// Function for the form select (array, the selected value, the field, the field where the description is)
function selectcode($array1,$val,$name1="",$name2="")
{
for ($i=1; $i<=count($array1); $i++)
{
$name1_val = $array1[$i]["$name1"];
if($name1_val=="") $name1_val=0;
if($val == $name1_val)
{
?> <option value='<?echo $name1_val?>' selected> <?echo $array1[$i]["$name2"]?> <?;
}
else
{
?> <option value='<?echo $name1_val?>'> <?echo $array1[$i]["$name2"]?> <?;
}
}
echo "</select>";
}// end of function
function selectcode2($array1,$val)
{
foreach($array1 as $value){
if($value==$val) echo "<option value='$value' selected>$value";
else echo "<option value='$value'>$value";
}
echo "</select>";
}// end of function
// array1 is the values, array2 is the description, $val is the selected data
function selectcode3($array1,$array2,$val)
{ $count=0;
foreach($array1 as $value){
if($value==$val) echo "<option value='$value' selected>".$array2[$count];
else echo "<option value='$value'>".$array2[$count];
$count++;
}
}
function radiocode($array1,$realval,$name)
{
foreach($array1 as $value){
if($value==$realval)
echo "<input class=radio type=radio id='$name' name='$name' value='$value' checked>$value";
else
echo "<input class=radio type=radio id='$name' name='$name' value='$value'>$value";
}
}// end of function
?>
PK 9@]�qw� � func_ajax.jsnu �[��� // JavaScript Document
var ajax = new sack();
function load_category1(){
var rand_num;
var category_id = document.thisonly2.category_id.value;
rand_num=parseInt(Math.random()*99999999999);
ajax.requestFile = 'sqloptions.php?what=load_category1&category_id='+category_id;
ajax.onCompletion = get_load_values;
ajax.runAJAX();
}
function load_category2(){
var rand_num;
var category_id = document.thisonly.category_id.value;
rand_num=parseInt(Math.random()*99999999999);
ajax.requestFile = 'sqloptions.php?what=load_category2&category_id='+category_id;
ajax.onCompletion = get_load_values;
ajax.runAJAX();
}
function get_load_values() {
eval(ajax.response);
}PK 9@]�ҥ�� � banner.htmlnu �[��� <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>banner</title>
</head>
<body bgcolor="#ffffff">
<!--url's used in the movie-->
<!--text used in the movie-->
<!-- saved from url=(0013)about:internet -->
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="542" height="175" id="banner" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="banner.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><embed src="banner.swf" quality="high" bgcolor="#ffffff" width="542" height="175" name="banner" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
</body>
</html>
PK 9@]ir5�u u job_seekers.phpnu �[��� <? require_once("func_proc.php");
do_header("FOR JOB SEEKERS");
?>
<table width="585" border="0" cellpadding="0" cellspacing="0">
<tr><td width="585" height="170" align="right" valign="top">
<table width="100%" height="159" border="0" align="center" cellpadding="0" cellspacing="0" background="images/iris_main_bgleft.gif" style="background-repeat:no-repeat">
<tr><td width="585" height="170" valign="top" style="padding-left:25px; padding-right:20px; padding-top:15px"><p align="left"><span class="style3">FOR</span><span class="style5">JOB SEEKERS</span></p>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr><td>
<table border="0" cellpadding="3" cellspacing="0" width="100%">
<tr><td colspan="2">
<div align="left"><b> Job Opportunities </b></div>
<p align="justify"><img src="images/iris_jobseekers_pic.jpg" alt="" width="160" height="198" align="left" style="padding-right:10px; padding-bottom:10px"/>Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source. Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of "de Finibus Bonorum et Malorum" (The Extremes of Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular during the Renaissance. The first line of Lorem Ipsum, "Lorem ipsum dolor sit amet..", comes from a line in section 1.10.32. </p>
</td></tr>
<tr><td align="right" colspan="2"><p><a href="apply_online.php"><img src="images/iris_jobseekers_btn.jpg" width="146" height="63" border="0" alt="Apply Onlint" title="Apply Onlint" /></a></p>
</td></tr>
</table>
</td></tr>
</table>
</td></tr>
</table>
</td></tr>
</table>
<? do_rightContent() ?>
<?php do_footer() ?>
<? if($msg) echo "<script>alert('$msg')</script>"; ?>PK 9@]q( K K
view_jobs.phpnu �[��� <?php
//require all the functions to be used.
require_once("func_all.php");
do_html_header("Job Opportunities"); //header.
do_menu();
?>
<link href="letter.css" rel="stylesheet" type="text/css" />
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<th align="left" scope="col" style="padding:20px;"><img src="images/openings.gif" width="167" height="27" /></th>
</tr>
</table>
<br><br>
<?php
do_all_list_jobs(); //all job opening.
?>
<?php
//} //end for for($counter=1; $counter<=count($jobs); ++$counter).
do_footer(); //footer.
?>PK 9@]`l^�� � employer/sqloptions.phpnu �[��� <?php
session_start();
require_once("func_all.php");
switch($what){
/* -------------------------- ajax load on select box -------------------------- */
case 'load_category_source':
$positions = getdata("select * from positions where category_id='$category_id' order by name");
$num_positions = count($positions);
?>
var positions = document.forms[0].position_id;
positions.options.length = 0;
positions.options[positions.options.length] = new Option('All','');
<?
for ($i=1; $i<=$num_positions; $i++) { ?>
positions.options[positions.options.length] = new Option('<?=$positions[$i][name]?>','<?=$positions[$i][position_id]?>');
<? }
break;
case 'load_position':
$positions = getdata("select jo.jo_pos_id, pos.name from jo_position as jo, positions as pos where 1 and jo.position_id = pos.position_id and jo.job_order_id='$job_order_id' order by pos.name");
$num_positions = count($positions);
?>
var positions = document.forms[0].jo_pos_id;
positions.options.length = 0;
positions.options[positions.options.length] = new Option('All','');
<?
for ($i=1; $i<=$num_positions; $i++) { ?>
positions.options[positions.options.length] = new Option('<?=$positions[$i][name]?>','<?=$positions[$i][jo_pos_id]?>');
<? }
break;
}
?>PK 9@]�̲�( ( employer/index.phpnu �[��� <?
header("Location: login.php");
?>
PK 9@]���� � employer/func_select_codes.phpnu �[��� <?
/* List of functions that make select for the dates. */
function datebox($name,$val,$formname,$month,$day,$year) {
list ($year1, $month1, $day1) = split ('[-]', $val);
$code = "<input type=text name='$name' value='".convertToTextDate($val)."' size='11' maxlength='10'
onFocus=\"javascript:vDateType='1'\" onKeyUp=\"DateFormat(this,this.value,event,false,'1')\" onBlur=\"DateFormat(this,this.value,event,true,'1')\" onchange=\"splitDate(this,this.value,document.$formname.$month,document.$formname.$day,document.$formname.$year)\">
<font size=1>(MM/DD/YYYY)</font>";
$code.="<input type=hidden name='$month' value='$month1'>
<input type=hidden name='$day' value='$day1'>
<input type=hidden name='$year' value='$year1'>
";
return $code;
break;
}// end of function dateselect()
function dateselect($name,$date,$val,$from,$to,$noday=0,$nolegend=0) {
switch ($date){
case "month" :
if($val == '00') $val = '';
$code = "<input type=text name='$name' id='$name' value='$val' size=2 maxlength=2 onKeyUp=\"return autoTab(this, 2, event);\" onfocus='select()' onkeypress=\"return isNumberKey(event);\">/";
return $code;
break;
case "day" :
if($val == '00') $val = '';
$code = "<input type=text name='$name' id='$name' value='$val' size=2 maxlength=2 onKeyUp=\"return autoTab(this, 2, event);\" onfocus='select()' onkeypress=\"return isNumberKey(event);\">/";
return $code;
break;
case "year" :
if($noday) $com = "(MM/YYYY)";
else$com = "(MM/DD/YYYY)";
if($nolegend) $com ="";
if($val == '0000') $val = '';
$code = "<input type=text name='$name' id='$name' value='$val' size=4 maxlength=4 onfocus='select()' onkeypress=\"return isNumberKey(event);\"><font size=1>$com</font>";
return $code;
break;
}// end of switch statement
}// end of function dateselect()
function dateselect1($name,$date,$val,$from,$to) {
switch ($date){
case "month" : $code = "<select name='$name'>";
$code.= "<option value=''>MM";
$months=array(1=>Jan,2=>Feb,3=>Mar,4=>April,5=>May,6=>June,7=>July,8=>Aug,9=>Sept,10=>Oct,11=>Nov,12=>Dec);
foreach ($months as $key => $value){
$key = str_pad($key, 2, "0", STR_PAD_LEFT);
if($val == "$key"){ $code.= "<option value='$key' selected>$value"; }
else $code.= "<option value='$key'>$value";
}
$code.= "</select>";
return $code;
break;
case "day" : $code = "<select name='$name'>";
$code.= "<option value=''>DD";
for ($i=1; $i<=31; $i++){
$i = str_pad($i, 2, "0", STR_PAD_LEFT);
if($val == "$i"){ $code.= "<option value='$i' selected>$i"; }
else $code.= "<option value='$i'>$i";
}
$code.= "</select>";
return $code;
break;
case "year" : $code = "<select name='$name'>";
$code.= "<option value=''>YYYY";
$from_this_year = date("Y")-$from; // set the year with respect to the current year
$to_this_year = date("Y")+ $to;
if($val < $from_this_year && $val != 0){
$diff = $from_this_year - $val ;
$from_this_year = $from_this_year - $diff;
}
for ($i=$to_this_year; $i>=$from_this_year; $i--){
if($val == $i){ $code.= "<option value=$i selected>$i"; }
else $code.= "<option value=$i>$i";
}
$code.= "</select>";
return $code;
break;
}// end of switch statement
}// end of function dateselect()
// Function for the form select (array, the selected value, the field, the field where the description is)
function selectcode($array1,$val,$name1="",$name2="")
{
for ($i=1; $i<=count($array1); $i++)
{
$name1_val = $array1[$i]["$name1"];
if($name1_val=="") $name1_val=0;
if($val == $name1_val)
{
?> <option value='<?echo $name1_val?>' selected> <?echo $array1[$i]["$name2"]?> <?;
}
else
{
?> <option value='<?echo $name1_val?>'> <?echo $array1[$i]["$name2"]?> <?;
}
}
echo "</select>";
}// end of function
function selectcode2($array1,$val)
{
foreach($array1 as $value){
if($value==$val) echo "<option value='$value' selected>$value";
else echo "<option value='$value'>$value";
}
echo "</select>";
}// end of function
// array1 is the values, array2 is the description, $val is the selected data
function selectcode3($array1,$array2,$val)
{ $count=0;
foreach($array1 as $value){
if($value==$val) echo "<option value='$value' selected>".$array2[$count];
else echo "<option value='$value'>".$array2[$count];
$count++;
}
}
function radiocode($array1,$realval,$name)
{
foreach($array1 as $value){
if($value==$realval)
echo "<input class=radio type=radio name='$name' value='$value' checked>$value";
else
echo "<input class=radio type=radio name='$name' value='$value'>$value";
}
}// end of function
?>
PK 9@]�b�� � employer/my_profile.phpnu �[��� <?
session_start();
require_once("func_all.php");
do_html_header("My Profile");
$principal = getdata_one("*","principals","principal_id",$myprincipalid);
?>
<tr><td height="100%" align=center valign="top">
<table align=center cellpadding='2' cellspacing='2'>
<tr><td valign="top"><br>
<table border=0 cellpadding='0' cellspacing='0' width="100%">
<tr><td valign="top"><img src="img/addleft.gif" border="0"></td>
<td background="img/addtile.gif" width="100%"><b>My Profile</b></a></td>
<td valign="top"><img src="img/addright.gif" border="0"></td></tr>
</table>
</td></tr>
<tr><td colspan=2>
<table border="0" cellpadding="0" cellspacing="0" width=100%>
<tr><td><img src="img/topleft-login.gif" border="0"></td>
<td background="img/toptile-login.gif"><img src="img/toptile-login.gif" border="0"></td>
<td><img src="img/topright-login.gif" border="0"></td></tr>
<tr><td background="img/midleft-login.gif"><img src="img/midleft-login.gif" border="0"></td>
<td width="100%" align="center" bgcolor="#dbdee3">
<table width="100%" cellpadding='3' cellspacing='3'>
<tr><td class="box_1">Name</b></td><td valign=top class="box"><b><?=$principal["name"];?></td></tr>
<tr><td class="box_1">Address</b></td><td valign=top class="box"><?=$principal["address"];?></td></tr>
<tr><td class="box_1">City</b></td><td valign=top class="box"><?=$principal["city"];?></td></tr>
<tr><td class="box_1">Country</b></td><td class="box"><?=getname($principal['country_id'],"country","country_id")?></td></tr>
<tr><td class="box_1">Fax</b></td><td valign=top class="box"><?=$principal["fax"];?></td></tr>
<tr><td class="box_1">Telephone</b></td><td class="box"><?=$principal["telephone"];?></td></tr>
<tr><td class="box_1">Email Address</b></td><td class="box"><?=$principal["email"];?></td></tr>
<tr><td class="box_1">Contact Person</b></td><td class="box"><?=$principal["contact_person"];?></td></tr>
<tr><td class="box_1">Position</b></td><td class="box"><?=$principal["contact_position"];?></td></tr>
<tr><td class="box_1">Accreditation No</b></td><td class="box"><?=$principal["acc_no"];?></td></tr>
<tr><td class="box_1">Valid Until</b></td><td class="box"><?=dateformat($principal["acc_date"])?></td></tr>
<tr><td class="box_1">Recruitment Officer </b></td><td class="box"><?=$principal["RO"];?></td></tr>
<tr><td class="box_1">Username </b></td><td valign=top class="box"><?=$principal["username"];?></td></tr>
<tr><td class="box_1">Password </b></td><td valign=top class="box"><?=$principal["password"]?></td></tr>
</table>
</td>
<td background="img/midright-login.gif"><img src="img/midright-login.gif" border="0"></td></tr>
<tr><td><img src="img/botleft-login.gif" border="0"></td>
<td background="img/bottile-login.gif"><img src="img/bottile-login.gif" border="0"></td>
<td><img src="img/botright-login.gif" border="0"></td></tr>
</table>
</td></tr>
</table>
</tr></td>
<?
do_html_footer();
?>PK 9@]W��sm m employer/func_all.phpnu �[��� <?
require_once("func_proc.php");
require_once("func_select.php");
require_once("func_select_codes.php");
?>
PK 9@]�;S�� � employer/img/topright-icon.gifnu �[��� GIF89a � ��⬯����ims���LMO��Թ����������ս�ǐ��~�����!� , e�ș*�z a��!h�&�bp3�Ƕ�r�N#(�; C(���]�Axd �,��+ �v@N
19�<0���������}e��f� ;PK 9@]����[ [ employer/img/appdata.gifnu �[��� GIF89a9 &