Ejemplo n.º 1
0
function CENTRALIZED_EMAIL_RESPONSE_SYSTEM($properties, $message_indicator, $to, $PADINFO, $pname_uri)
{
    //access all the variables needed
    global $comment_id;
    global $yname;
    global $b_year;
    global $b_month;
    global $b_day;
    global $pname_title;
    global $webmaster_title;
    global $comment_ticket_id;
    global $EXTRA_NAME;
    global $poc_name;
    global $reason_name;
    global $dateandtime;
    global $ymessage;
    global $ticket_id;
    global $FORMNAME;
    global $event_name;
    global $username;
    global $password;
    global $full_pin;
    global $fname;
    global $lname;
    global $typeofuser;
    $to = $to;
    //get the message by message_indicator from the db
    $GET_MI = mysql_query("SELECT * FROM {$properties->DB_PREFIX}cers_messages WHERE message_indicator='" . $message_indicator . "'");
    $FETCH_MI = mysql_fetch_array($GET_MI);
    $subject = $FETCH_MI['subject'];
    $message = $FETCH_MI['content'];
    //interpret subject
    $subject = str_replace("(WEBSITE_URL_NAME)", $properties->WEBSITE_NAME . $properties->WEBSITE_EXT, $subject);
    $subject = str_replace("(EXTRA_NAME)", $EXTRA_NAME, $subject);
    $subject = str_replace("(EVENT_NAME)", $event_name, $subject);
    $subject = str_replace("(TYPE_OF_USER)", $typeofuser, $subject);
    //interpret message
    $message = str_replace("(FNAME)", $fname, $message);
    $message = str_replace("(LNAME)", $lname, $message);
    //special implementation as of 3.9.1
    /* DETERMINE THE WEBSITE_URL */
    if ($_SERVER['HTTP_HOST'] == "localhost") {
        $WEBSITE_URL = $properties->WEBSITE_TEST_URL;
    } else {
        $WEBSITE_URL = $properties->WEBSITE_REMO_URL;
    }
    $message = str_replace("(WEBSITE_URL)", $WEBSITE_URL, $message);
    $message = str_replace("(COMMENT_ID)", $comment_id, $message);
    $message = str_replace("(WEBSITE_URL_NAME)", $properties->WEBSITE_NAME . $properties->WEBSITE_EXT, $message);
    $message = str_replace("(TO_WHOM_IT_MAY_CONCERN)", $yname, $message);
    $message = str_replace("(PNAME_URI)", $pname_uri, $message);
    $message = str_replace("(PADINFO)", $PADINFO, $message);
    $message = str_replace("(PNAME_TITLE)", $pname_title, $message);
    $message = str_replace("(PNAME_TITLE_SAFE)", converter($properties, $pname_title, 'url', 'to'), $message);
    $message = str_replace("(B_YEAR)", $b_year, $message);
    $message = str_replace("(B_MONTH)", $b_month, $message);
    $message = str_replace("(B_DAY)", $b_day, $message);
    $message = str_replace("(COMMENT_TICKET_ID)", $comment_ticket_id, $message);
    $message = str_replace("(PADMAIN)", $properties->PADMAIN, $message);
    $message = str_replace("(POC_NAME)", $poc_name, $message);
    $message = str_replace("(REASON_NAME)", $reason_name, $message);
    $message = str_replace("(DATEANDTIME)", $dateandtime, $message);
    $message = str_replace("(YMESSAGE)", $ymessage, $message);
    $message = str_replace("(TICKET_ID)", $ticket_id, $message);
    $message = str_replace("(FORMNAME)", $FORMNAME, $message);
    $message = str_replace("(EXTRA_NAME)", $EXTRA_NAME, $message);
    $message = str_replace("(EVENT_NAME)", $event_name, $message);
    $message = str_replace("(USERNAME)", $username, $message);
    $message = str_replace("(PASSWORD)", $password, $message);
    $message = str_replace("(FULL_PIN)", $full_pin, $message);
    //get the headwebmaster's title
    $GET_HW_TITLE = mysql_query("SELECT * FROM {$properties->DB_PREFIX}users WHERE is_webmaster='yes'");
    $FETCH_HW_TITLE = mysql_fetch_array($GET_HW_TITLE);
    $staff_type = $FETCH_HW_TITLE['staff_type'];
    $how_to_display_name = $FETCH_HW_TITLE['how_to_display_name'];
    if ($how_to_display_name == "full") {
        $webmaster_name = $FETCH_HW_TITLE['fname'] . " " . $FETCH_HW_TITLE['lname'];
    } else {
        if ($how_to_display_name == "only first name") {
            $webmaster_name = $FETCH_HW_TITLE['fname'];
        } else {
            if ($how_to_display_name == "only username") {
                $webmaster_name = $FETCH_HW_TITLE['uname'];
            }
        }
    }
    //fetch the staff type name
    $GET_TITLE_NAME = mysql_query("SELECT * FROM {$properties->DB_PREFIX}staff_types WHERE id='{$staff_type}'");
    $FETCH_TITLE_NAME = mysql_fetch_array($GET_TITLE_NAME);
    $webmaster_title = $FETCH_TITLE_NAME['name'];
    $message = str_replace("(WEBMASTER_TITLE)", $webmaster_title, $message);
    $message = str_replace("(COMPANY_NAME)", $properties->COMPANY_NAME, $message);
    $message = str_replace("(AUTORESPONDER_CLOSING_LINE)", getGlobalVars($properties, 'autoresponder_closing_line'), $message);
    $message = str_replace("(WEBMASTER_NAME)", $webmaster_name, $message);
    $headers = "From: " . getGlobalVars($properties, 'webmaster_email') . "\r\n" . "MIME-Version: 1.0" . "\r\n" . "Content-type: text/html; charset=iso-8859-1" . "\r\n" . "Reply-To: " . getGlobalVars($properties, 'webmaster_email') . "\r\n" . "X-Mailer: PHP/" . phpversion();
    if ($_SERVER['HTTP_HOST'] == $properties->HTTP_HOST) {
        /* on localhost; do not send because i have no email system set up on localhost and it will give errors */
        echo "<b>[OUTPUT MESSAGE]</b> Due to the type of system being used (localhost) we have shut off the email sending function because of lack of ability to send emails on this server. Instead, here is the outputted message of the email you just &quot;Sent&quot;:<br /><br />To: {$to}<br />Subject: {$subject}<br />Message: {$message}<br />Headers: {$headers}<br /><b>[/OUTPUT MESSAGE]</b>";
    } else {
        mail($to, $subject, $message, $headers);
    }
}
     echo "<div id=\"module-full-container-lcol\">";
     echo "<h2>Name</h2>";
     echo "</div>";
     echo "<div id=\"module-full-container-rcol\">";
     //the title
     echo "<div id=\"module-full-a-container-title\">";
     if ($pname == "pages") {
         /* SPECIAL INSTRUCTIONS : PAGES */
         //get the lpm
         $GET_LPM = mysql_query("SELECT * FROM {$properties->DB_PREFIX}launchpads WHERE id='{$lpm}'");
         $FETCH_LPM = mysql_fetch_array($GET_LPM);
         $lpm = $FETCH_LPM['short'];
         echo "<a href=\"" . $WEBSITE_URL . $lpm . "/" . $page . "\">" . $pageNAME . "</a>";
     } else {
         if ($display_user === true) {
             echo "<a href=\"" . $WEBSITE_URL . $PADINFO . "/" . $pname_uri . "/folio/" . converter($properties, $name, 'url', 'to') . "\">" . $name . "</a>";
         } else {
             echo "<a href=\"" . $WEBSITE_URL . $PADINFO . "/" . $pname_uri . "/category/" . $shortname . "\">" . $name . "</a>";
         }
     }
     echo "</div>";
     echo "</div>";
     echo "</div>";
     echo "</div>";
     echo "<br />";
     break;
 case 'double':
     /* FOR MORE COMPLEX DOUBLE ROW ITEMS (EG. USERS) */
     /* START BUILDING LIST */
     echo "<div id=\"module-full-container\">";
     echo "<div id=\"module-full-crow\">";
Ejemplo n.º 3
0
         mysql_query("UPDATE {$properties->DB_PREFIX}" . $what . " SET title='" . $editpage_title . "' WHERE id='" . $page . "'");
         mysql_query("UPDATE {$properties->DB_PREFIX}" . $what . " SET content='" . $editpage_content . "' WHERE id='" . $page . "'");
         mysql_query("UPDATE {$properties->DB_PREFIX}" . $what . " SET status='" . $editpage_status . "' WHERE id='" . $page . "'") or die(mysql_error());
         if ($editpage_startedit == "no") {
             mysql_query("UPDATE {$properties->DB_PREFIX}" . $what . " SET dateandtime_goingtostart='" . $editpage_date . " " . $editpage_time . "' WHERE id='" . $page . "'");
         } else {
             if ($editpage_startedit == "yes") {
                 mysql_query("UPDATE {$properties->DB_PREFIX}" . $what . " SET dateandtime='" . $editpage_date . " " . $editpage_time . "' WHERE id='" . $page . "'");
             }
         }
         mysql_query("UPDATE {$properties->DB_PREFIX}" . $what . " SET featured='" . $editpage_isfeatured . "' WHERE id='" . $page . "'");
         mysql_query("UPDATE {$properties->DB_PREFIX}" . $what . " SET featured_image='" . $editpage_featuredimage . "' WHERE id='" . $page . "'");
         if ($editpage_customcategory != "") {
             /* NEW CATEGORY */
             /* INSERT THE NEW CAT */
             mysql_query("INSERT INTO {$properties->DB_PREFIX}" . $base . "_categories (name,shortname,parentid,is_searchable) VALUES ('{$editpage_customcategory}','" . converter($properties, $editpage_customcategory, "url", "to") . "','0','yes')");
             /* GET INSERT ID */
             $new_category_id = mysql_insert_id();
             mysql_query("UPDATE {$properties->DB_PREFIX}" . $what . " SET category='" . $new_category_id . "' WHERE id='" . $page . "'");
         } else {
             mysql_query("UPDATE {$properties->DB_PREFIX}" . $what . " SET category='" . $editpage_category . "' WHERE id='" . $page . "'");
         }
         mysql_query("UPDATE {$properties->DB_PREFIX}" . $what . " SET tags='" . $editpage_tags . "' WHERE id='" . $page . "'");
         /* STEP 4: POST RETURN OF RECEIPT */
         echo "<br /><b>" . $editpage_title . "</b> has been successfully updated! <a href=\"" . $WEBSITE_URL . "?menu=pages\">Refresh</a>";
     }
 } else {
     $pageid = $_GET['pageid'];
     $what = $_GET['what'];
     $pad = $_GET['pad'];
     $GET_ENTRY_INFO = mysql_query("SELECT * FROM {$properties->DB_PREFIX}" . $what . " WHERE id='" . $pageid . "'");
Ejemplo n.º 4
0
 } else {
     while ($FETCH_ENTRY_INFO = mysql_fetch_array($GET_ENTRY_INFO)) {
         $postid_name = $FETCH_ENTRY_INFO['title'];
         $postid_content = $FETCH_ENTRY_INFO['content'];
         $postid_dateyear = $FETCH_ENTRY_INFO['date_year'];
         $postid_datemonth = $FETCH_ENTRY_INFO['date_month'];
         $postid_dateday = $FETCH_ENTRY_INFO['date_day'];
         $postid_datehour = $FETCH_ENTRY_INFO['date_hour'];
         $postid_datemin = $FETCH_ENTRY_INFO['date_min'];
         $postid_datesec = $FETCH_ENTRY_INFO['date_sec'];
         $postid_tags = $FETCH_ENTRY_INFO['tags'];
         $postid_featured = $FETCH_ENTRY_INFO['featured'];
         $postid_featured_image = $FETCH_ENTRY_INFO['featured_image'];
         $postid_dateandtime = $FETCH_ENTRY_INFO['dateandtime'];
         $postid_dateandtime_goingtostart = $FETCH_ENTRY_INFO['dateandtime_goingtostart'];
         $postid_nameclean = converter($properties, $postid_name, "url", "to");
         $postid_category = $FETCH_ENTRY_INFO['category'];
         $postid_status = $FETCH_ENTRY_INFO['status'];
         echo "<h3>Editing the post of &quot;" . $postid_name . "&quot; apart of the page: " . $pop . "</h3>";
         //0000-00-00 00:00:00
         //0123456789012345678
         $postid_dateyeargts = substr($dateandtime_goingtostart, 0, 4);
         $postid_datemonthgts = substr($dateandtime_goingtostart, 5, 2);
         $postid_datedaygts = substr($dateandtime_goingtostart, 8, 2);
         $postid_datehourgts = substr($dateandtime_goingtostart, 11, 2);
         $postid_datemingts = substr($dateandtime_goingtostart, 14, 2);
         $postid_datesecgts = substr($dateandtime_goingtostart, 17, 2);
         /* --------------- CUSTOM ADDONS ----------------------------------------------------------------------------------------- */
         /* ADDON: AF : A-Z LIST */
         if ($pop == "a-z-list") {
             $postid_addon_director = $FETCH_ENTRY_INFO['director'];
Ejemplo n.º 5
0
            $total_horas_normais = '';
            $html = '<html>
				<head>
				</head>
				<body>
					<div class="content" style="width:100%; style="text-align: center; padding:1px"; background-color:#dedede; font-family: Arial">
						<span style="margin: 0 auto; font-size: 18px;"><b>FOLHA DE PONTO INDIVIDUAL DE TRABALHO</b></span>
						<table border="1" style="font-size:9px; width:100%; font-family: Arial">
							<tr>
								<td colspan="4" style="padding:1px"><div style="font-size:6">EMPREGADOR / NOME - EMPRESA:</div><div><b>' . strtoupper($empresa->razao_social) . '</b></div></td><td  style="padding:1px"><div style="font-size:6">CEI/CNPJ:</div><div><b>' . $empresa->cnpj . '</b></div></td>
							</tr>
							<tr>
								<td style="padding:1px"><div style="font-size:6">ENDEREÇO / LOGRADOURO:</div><div><b>' . $endereco[0][0] . '</b></div></td><td  style="padding:1px"><div style="font-size:6">Nº:</div><div><b>' . $endereco[0][1] . '</b></div></td><td  style="padding:1px"><div style="font-size:6">BAIRRO / DISTRO:</div><div><b>' . $endereco[0][4] . '</b></div></td><td  style="padding:1px"><div style="font-size:6">CIDADE:</div><div><b>' . $cidade->nome . '</b></div></td><td  style="padding:1px"><div style="font-size:6">UF:</div><div><b>' . $estado->uf . '</b></div></td>
							</tr>
							<tr>
								<td colspan="3" style="padding:1px"><div style="font-size:6">EMPREGADO:</div><div><b>' . $funcionario->nome . '</b></div></td><td  style="padding:1px"><div style="font-size:6">CTPS / C.I. Nº e SÉRIE:</div><div><b>' . $funcionario->num_cart_trab . '</b></div></td><td style="padding:1px"><div style="font-size:6">DATA DE ADMISSÃO:</div><div><b>' . converter($funcionario->data_adm) . '</b></div></td>
							</tr>
							<tr>
								<td colspan="3" style="padding:1px"><div style="font-size:6">FUNÇÃO:</div><div><b>' . $cbo->descricao . '</b></div></td><td  style="padding:1px"><div style="font-size:6">SALÁRIO BASE R$:</div><div><b>' . $funcionario->salario_base . '</b></div></td><td style="padding:1px"><div style="font-size:6">QUANTIDADE DE HORAS SEMANAIS:</div><div><b>' . $funcionario->qtd_horas_sem . '</b></div></td>
							</tr>
							<tr>
								<td colspan="2" style="padding:1px"><div style="font-size:6">HORÁRIO DE TRABALHO:</div><div><b>' . $turno->desc . '</b></div></td><td  style="padding:1px"><div style="font-size:6"></div><div></div></td><td style="padding:1px"><div style="font-size:6">MÊS:</div><div><b>' . strtoupper($string_mes) . '</b></div></td><td><div style="font-size:6">ANO:</div><div><b>' . $ano . '</b></div></td>
							</tr>
						</table>

						<table border="1" style="font-size:8px; width:100%; text-align:center">
							<tr>
								<td rowspan="2" style="font-size:6px">DIAS</td>
								<td rowspan="2">ENTRADA MANHÃ</td>
								<td colspan="2">ALMOÇO</td>
								<td rowspan="2">SAÍDA<BR />TARDE</td>
Ejemplo n.º 6
0
            echo $properties->PROPS_VAR_BODYSB_WRAP_START;
            echo converter($properties, $content_main, 'basic', 'to');
            echo eval($content_main_code);
            echo converter($properties, $content_main_after_code, 'basic', 'to') . "<br />";
            echo $properties->PROPS_VAR_BODYSB_WRAP_END;
            ?>
					<!-- Column one end -->
					
					</div>
					<div id="col2">
					<!-- Column two start -->
					<?php 
            echo $properties->PROPS_VAR_BODYSB_WRAP_START;
            echo converter($properties, $content_sidebar, 'basic', 'to');
            echo eval($content_sidebar_code);
            echo converter($properties, $content_sidebar_after_code, 'basic', 'to') . "<br />";
            echo $properties->PROPS_VAR_BODYSB_WRAP_END;
            ?>
					<!-- Column two end -->
					
					</div>
					<div id="col3">
					<!-- Column three start -->
					<?php 
            echo $properties->PROPS_VAR_BODYSB_WRAP_START;
            echo $content_sidebar2;
            echo eval($content_sidebar_code2);
            echo $content_sidebar_after_code2;
            echo $properties->PROPS_VAR_BODYSB_WRAP_END;
            ?>
					<!-- Column three end -->
	</form>
	<p style = 'font-weight: bold;'> Instruction: Please enter the base degree, and choose 
		the desired type of convision, then press the 'Convert!' button</p>
	
	<?php 
if (isset($_GET["submitted"])) {
    $degree = $type = "";
    if (isset($_GET["degree"])) {
        $degree = $_GET["degree"];
    }
    if (isset($_GET["type"])) {
        $type = $_GET["type"];
    }
    if ($degree != "" && $type != "") {
        if (is_numeric($degree)) {
            converter($type, $degree);
        } else {
            echo "<p style = 'color: red; font-size: 150%;'> Invalid input, please enter a number.</p>";
            exit;
        }
    } elseif ($type == "" && $degree != "") {
        echo "<p style = 'color: red; font-size: 150%;'> Invalid input, please select the type of conversion.</p>";
        exit;
    } elseif ($degree == "" && $type != "") {
        echo "<p style = 'color: red; font-size: 150%;'> Invalid input, please please enter the base degree.</p>";
        exit;
    } elseif ($degree == "" && $type == "") {
        echo "<p style = 'color: red; font-size: 150%;'> Invalid input, please enter the degree and select the type.</p>";
        exit;
    } else {
        exit;
Ejemplo n.º 8
0
}
//tell what kind of page type this is
header("Content-Type: application/rss+xml; charset=ISO-8859-1");
//setup the rssfeed $variable
$rssfeed = '<?xml version="1.0" encoding="ISO-8859-1"?>';
$rssfeed .= '<rss version="2.0">';
$rssfeed .= '';
$rssfeed .= '<channel>';
$rssfeed .= '<title>' . $properties->WEBSITE_NAME . $properties->WEBSITE_EXT . ' RSS Feed</title>';
$rssfeed .= '<link>' . $WEBSITE_URL . '</link>';
$rssfeed .= '<description>Fresh news about Web Development, iPhone, and other Computer-related stuff at your fingertips!</description>';
$rssfeed .= '<language>en-us</language>';
$rssfeed .= '<copyright>Copyright &copy; 2013 ' . $properties->WEBSITE_NAME . $properties->WEBSITE_EXT . '</copyright>';
//extract data and place in items
$GET_ALL_DATA = mysql_query("SELECT * FROM {$properties->DB_PREFIX}blog_entries WHERE status='Published' ORDER BY dateandtime DESC");
if (mysql_num_rows($GET_ALL_DATA) < 1) {
    /* NO DATA */
} else {
    while ($FETCH_ALL_DATA = mysql_fetch_array($GET_ALL_DATA)) {
        extract($FETCH_ALL_DATA);
        $rssfeed .= '<item>';
        $rssfeed .= '<title>' . $title . '</title>';
        $rssfeed .= '<description>' . converter($properties, $content, "fullarticle", "to") . '</description>';
        $rssfeed .= '<link>' . $WEBSITE_URL . $launchpad . '/' . $page . '/permalink/' . $date_year . '/' . $date_month . '/' . $date_day . '/' . converter($properties, $title, "url", "to") . '</link>';
        $rssfeed .= '<pubDate>' . $dateandtime . '</pubDate>';
        $rssfeed .= '</item>';
    }
}
$rssfeed .= '</channel>';
$rssfeed .= '</rss>';
echo $rssfeed;