示例#1
1
function validateData($Data)
{
    if (!isset($Data['name']) || !isset($Data['phone']) || !isset($Data['email']) || !isset($Data['num_people']) || !isset($Data['notes_requests'])) {
        return false;
    }
    return true;
}
require_once 'lib/class.phpmailer.php';
include "lib/class.smtp.php";
// optional, gets called from within class.phpmailer.php if not already loaded
if (!validateData($_POST)) {
    echo json_encode($_POST);
    exit;
}
$Data = $_POST;
$body = get_include_contents('mail_template.php', $Data);
$mail = new PHPMailer();
$mail->IsSMTP();
// telling the class to use SMTP
$mail->SMTPDebug = 2;
// enables SMTP debug information (for testing)
$mail->SMTPAuth = true;
// enable SMTP authentication
$mail->SMTPSecure = "tls";
// sets the prefix to the servier
$mail->Host = "smtp.gmail.com";
// sets GMAIL as the SMTP server
$mail->Port = 587;
// set the SMTP port for the GMAIL server
$mail->Username = "******";
// GMAIL username
示例#2
0
function layout_json($filename, $arr = null)
{
    header("Pragma: no-cache");
    header("Cache-Control: no-store, no-cache, max-age=0, must-revalidate");
    #header('Content-Type: text/x-json; charset=utf-8');
    #header('Content-Type: text/x-json');
    #header('Content-Type: text/html; charset=iso-8859-1');
    return get_include_contents('tpl/json/' . $filename . '.php', $arr);
}
示例#3
0
 function recache_slider($lang)
 {
     global $sitepress;
     global $wpdb;
     $oldLang = ICL_LANGUAGE_CODE;
     $sitepress->switch_lang($lang);
     $string = get_include_contents("../wp-content/themes/futurestep/home-jobsslider.php");
     $query = sprintf("UPDATE `feedstore` SET `time`=CURRENT_TIMESTAMP, `output`='%s' WHERE language='" . $lang['language_code'] . "'", mysql_real_escape_string($string));
     $wpdb->query($query);
     $wpdb->print_error();
     $sitepress->switch_lang($oldlang);
 }
function flagShowSkin_banner_widget_default($args)
{
    extract($args);
    $flag_options = get_option('flag_options');
    $skinID = 'id_' . mt_rand();
    // look up for the path
    $skinpath = trailingslashit($flag_options['skinsDirABS']) . $skin;
    $playlistpath = $flag_options['galleryPath'] . 'playlists/banner/' . $xml . '.xml';
    $js = $flag_options['skinsDirURL'] . $skin . "/jquery.cycle.lite.js";
    $data = file_get_contents($skinpath . '/settings/settings.xml');
    $flashBackcolor = flagGetBetween($data, '<property1>0x', '</property1>');
    if (empty($width)) {
        $width = flagGetBetween($data, '<width><![CDATA[', ']]></width>');
    }
    if (empty($height)) {
        $height = flagGetBetween($data, '<height><![CDATA[', ']]></height>');
    }
    $wmode = flagGetBetween($data, '<property0><![CDATA[', ']]></property0>');
    if (empty($flashBackcolor)) {
        $flashBackcolor = $flag_options['flashBackcolor'];
    }
    $params['autoPlay'] = flagGetBetween($data, '<autoPlay>', '</autoPlay>');
    $params['slideshowDelay'] = flagGetBetween($data, '<slideshowDelay>', '</slideshowDelay>');
    $alternate = get_include_contents($skinpath . "/jgallery.php", $playlistpath, $skin, $skinID, $width, $height, $params);
    // init the flash output
    $swfobject = new flag_swfobject($flag_options['skinsDirURL'] . $skin . '/gallery.swf', $skinID, $width, $height, '10.1.52', plugins_url('/' . FLAGFOLDER . '/') . 'skins/expressInstall.swf');
    global $swfCounter;
    $swfobject->add_params('wmode', $wmode);
    $swfobject->add_params('allowfullscreen', 'true');
    $swfobject->add_params('allowScriptAccess', 'always');
    $swfobject->add_params('saling', 'lt');
    $swfobject->add_params('scale', 'noScale');
    $swfobject->add_params('menu', 'false');
    $swfobject->add_params('bgcolor', '#' . $flashBackcolor);
    $swfobject->add_attributes('id', $skinID);
    $swfobject->add_attributes('name', $skinID);
    // adding the flash parameter
    $swfobject->add_flashvars('path', $flag_options['skinsDirURL'] . $skin . '/');
    $swfobject->add_flashvars('skinID', $skinID);
    $swfobject->add_flashvars('playlist', $xml);
    // create the output
    $out = '<div class="grandbanner ' . $wmode . '">' . $swfobject->output($alternate) . '</div>';
    // add now the script code
    $out .= "\n" . '<script type="text/javascript" src="' . $js . '"></script>';
    $out .= "\n" . '<script type="text/javascript" defer="defer">';
    $out .= $swfobject->javascript();
    $out .= "\n" . '</script>';
    $out = apply_filters('flag_show_flash_w_content', $out);
    return $out;
}
 function a895_incparse($root, $source, $parsemode, $return = false)
 {
     switch ($parsemode) {
         case 'textile':
             $source = $root . $source;
             $content = file_get_contents($source);
             $html = a895_textileparser($content, true);
             break;
         case 'txt':
             $source = $root . $source;
             $content = file_get_contents($source);
             // links erzeugen
             //$content = ereg_replace('http://www.', 'www.', $content);
             $content = preg_replace('/www\\./', 'http://www.', $content);
             $content = preg_replace("#(^|[^\"=]{1})(http://|ftp://|mailto:|https://)([^\\s<>]+)([\\s\n<>]|\$)#sm", "\\1<a class=\"jsopenwin\" href=\"\\2\\3\">\\3</a>\\4", $content);
             $html = '<pre class="plain">' . $content . '</pre>';
             break;
         case 'raw':
             $source = $root . $source;
             $content = file_get_contents($source);
             $html = $content;
             break;
         case 'php':
             $source = $root . $source;
             $html = get_include_contents($source);
             break;
         case 'iframe':
             $html = '<iframe src="' . $source . '" width="99%" height="600px"></iframe>';
             break;
         case 'jsopenwin':
             $html = 'Externer link: <a href="' . $source . '">' . $source . '</a>
   <script language="JavaScript">
   <!--
   window.open(\'' . $source . '\',\'' . $source . '\');
   //-->
   </script>';
             break;
         case 'extlink':
             $html = 'Externer link: <a href="' . $source . '">' . $source . '</a>';
             break;
     }
     if ($return) {
         return $html;
     } else {
         echo $html;
     }
 }
示例#6
0
 public function __toString()
 {
     $classes = $this->classes;
     $classes[] = $this->slug;
     $result = '<section class="';
     $result .= implode(' ', $classes);
     $result .= '"';
     foreach ($this->contexts as $slug => $url) {
         $result .= ' data-url-' . $slug . '="' . $url . '"';
     }
     $result .= ' data-channel-name="' . $this->slug . '"';
     if (count($this->styles) > 0) {
         $result .= ' style="';
         foreach ($this->styles as $key => $value) {
             $result .= $key . ': ' . $value . ';';
         }
         $result .= '"';
     }
     $result .= '>';
     $result .= '<h1 class="channelname" onclick="toggleChannel($(this).closest(\'section\'));">' . $this->heading . '</h1>';
     if ($this->isHidden) {
         $result .= '<div class="content hiddenChannel">';
     } else {
         $result .= '<div class="content">';
     }
     if ($this->contentHTML != '') {
         $result .= $this->contentHTML;
     } else {
         if ($this->context != '' && isset($this->contexts[$this->context])) {
             $result .= get_include_contents($this->contexts[$this->context]);
         } elseif (isset($this->contexts['default'])) {
             $result .= get_include_contents($this->contexts['default']);
         } elseif (count($this->contexts) > 0) {
             $context_keys = array_keys($this->contexts);
             $result .= get_include_contents($this->contexts[$context_keys[0]]);
         }
     }
     $result .= '</div>';
     $result .= '</section>';
     return $result;
 }
示例#7
0
" enctype="multipart/form-data">
<?php 
    if (empty($_POST['edit_template']) or get_var('edit_template') == "css") {
        if (empty($_POST['edit_theme'])) {
            $themefile = dirname(dirname(dirname(__FILE__))) . DIRECTORY_SEPARATOR . AC_FOLDER_THEMES . DIRECTORY_SEPARATOR . $theme . "/css/style.css";
        } else {
            $themefile = dirname(dirname(dirname(__FILE__))) . DIRECTORY_SEPARATOR . AC_FOLDER_THEMES . DIRECTORY_SEPARATOR . get_var('edit_theme') . "/css/style.css";
        }
    } else {
        if (empty($_POST['edit_theme'])) {
            $themefile = dirname(dirname(dirname(__FILE__))) . DIRECTORY_SEPARATOR . AC_FOLDER_THEMES . DIRECTORY_SEPARATOR . $theme . "/template/" . get_var('edit_template') . ".php";
        } else {
            $themefile = dirname(dirname(dirname(__FILE__))) . DIRECTORY_SEPARATOR . AC_FOLDER_THEMES . DIRECTORY_SEPARATOR . get_var('edit_theme') . "/template/" . $_POST['edit_template'] . ".php";
        }
    }
    $textarea = get_include_contents($themefile);
    $textarea = stripslashes($textarea);
    $textarea = htmlspecialchars($textarea);
    ?>
					<textarea id="template_data" name="template_data"><?php 
    echo $textarea;
    ?>
</textarea>
<?php 
    if (is_writable($themefile)) {
        ?>
					<dl class="selectionBox submitBox">
						<dt></dt>
						<dd>
							<div class="floatr" style="float:right;">
								<a class="fwdbutton" onclick="document.forms['template-data'].submit(); return false">
示例#8
0
文件: include.php 项目: pixlr/zce-1
}
// works
if ((include 'vars.php') == 'OK') {
    echo 'OK';
}
echo "<hr>";
$foo = (include 'include/return.php');
echo $foo;
// prints 'PHP'
//because the include was successful. Notice the difference between the above examples. The first uses return within
//the included file while the other does not. If the file can't be included, FALSE is returned and E_WARNING is issued.
$bar = (include 'include/noreturn.php');
echo $bar;
// prints 1
echo "<hr>";
$string = get_include_contents('include/return.php');
echo $var;
//PHP
echo $string;
//nothing (note)
function get_include_contents($filename)
{
    if (is_file($filename)) {
        ob_start();
        include $filename;
        return ob_get_clean();
    }
    return false;
}
?>
示例#9
0
function bd_set_form_ml($data)
{
    global $config, $wpdb;
    $update_form_ml = $data['form_ml'];
    $form_ml_mail = get_option('form_ml_mail', 'error');
    $bank_hour = $data['bank_hour'];
    $bank_date = $data['bank_date'];
    $data['bank_hour'] = str_replace('.', '', $data['bank_hour']);
    $data['bank_date'] = str_replace('/', '-', $data['bank_date']);
    $data['bank_date'] .= ' ' . $data['bank_hour'];
    $data['bank_date'] = date("Y-m-d H:i:s", strtotime($data['bank_date']));
    unset($data['bank_hour']);
    unset($data['submit']);
    unset($data['form_ml']);
    if ($update_form_ml > 0) {
        $update_form_ml = $wpdb->update($config['tables']['forms'], $data, array('id_form_ml' => $update_form_ml));
    } else {
        $data['ship_status_now'] = $config['STATUS']['POR_VERIFICAR']['id'];
        $wpdb->insert($config['tables']['forms'], $data);
    }
    /*echo $wpdb->last_query;
    	echo '\nValor Form ML 222: ', $update_form_ml;
    	echo $wpdb->print_error();
    	echo $wpdb->show_errors();*/
    //exit( var_dump( $wpdb->last_query ) );
    //$msj = get_include_contents('/template/mail/client_register.html.php');
    //var_dump($msj);
    $data['bank_hour'] = $bank_hour;
    $data['bank_date'] = $bank_date;
    $data['ship_state'] = $config['STATES'][$data['ship_state']];
    if ($wpdb->insert_id) {
        $dataHistories['id_form_ml'] = $wpdb->insert_id;
        $dataHistories['ship_status'] = $data['ship_status_now'];
        $dataHistories['comments'] = $data['ship_comments'];
        $dataHistories['time_modified'] = current_time('mysql');
        $dataHistories['id_user_modifier'] = get_current_user_id();
        $wpdb->insert($config['tables']['forms_histories'], $dataHistories);
        //echo $wpdb->last_query;
        $data['id_form_ml'] = $wpdb->insert_id;
        $data['ship_status_now'] = $config['STATUS'][$data['ship_status_now']]['name'];
        //Client
        $data['subject'] = $config['EMAIL']['new']['client']['subject'];
        $msj = get_include_contents('/template/mail/client_register.html.php', $data);
        //var_dump($msj);
        _send_mail($data['user_email'], $data['subject'], $msj);
        //Admin
        $to_admin = $config['EMAIL']['reply']['from'];
        $data['subject'] = sprintf($config['EMAIL']['new']['reply']['subject'], $data['bank_name'], $data['user_names']);
        $msj = get_include_contents('/template/mail/admin_register.html.php', $data);
        _send_mail($to_admin, $data['subject'], $msj);
        return '<p>Formulario Insertado con &Eacute;XITO</p>';
    } else {
        if ($update_form_ml === false || $update_form_ml == 0) {
            return '<p>Error al insertar el Formulario.</p>';
        } else {
            return '<p>Formulario actualizado con &Eacute;XITO</p>';
        }
    }
}
示例#10
0
<?php

function get_include_contents($filename)
{
    if (is_file($filename)) {
        ob_start();
        include $filename;
        return ob_get_clean();
    }
    return false;
}
file_put_contents("cached_file.php", get_include_contents("template.php"));
		
	$adminPanel.="<div style='display:inline'> :: <a href='javascript:toggleVisibility(\"adminPanel\")';>Admin options</a></div>";
	
	if ($CONF_show_DBG_XML) {
		$adminPanel.="<div id=xmlOutput style='display:none; text-align:left;'><hr>";
		$adminPanel.="XML from paraglidingEarth.com<br>";
		$adminPanel.="<pre>$xmlSites1</pre><hr>XML from paragliding365.com<br><pre>$xmlSites2</pre></div>";
	}
	
	$adminPanel.="<div id='adminPanel' style='display:none; text-align:center;'><hr>";
	$adminPanel.="<a href='".getLeonardoLink(array('op'=>'show_flight','flightID'=>$flightID,'updateData'=>'1'))."'>"._UPDATE_DATA."</a> | ";
	$adminPanel.="<a href='".getLeonardoLink(array('op'=>'show_flight','flightID'=>$flightID,'updateMap'=>'1'))."'>"._UPDATE_MAP."</a> | ";
	$adminPanel.="<a href='".getLeonardoLink(array('op'=>'show_flight','flightID'=>$flightID,'updateCharts'=>'1'))."'>"._UPDATE_GRAPHS."</a> | ";
	$adminPanel.="<a href='".getLeonardoLink(array('op'=>'show_flight','flightID'=>$flightID,'updateScore'=>'1'))."'>"._UPDATE_SCORE."</a> ";
	
	$adminPanel.=get_include_contents(dirname(__FILE__)."/site/admin_takeoff_info.php");
}

$images="";
for ( $photoNum=1;$photoNum<=$CONF_photosPerFlight;$photoNum++){
	$photoFilename="photo".$photoNum."Filename";
	if ($flight->$photoFilename) {
		$images.="<a class='shadowBox imgBox' href='".$flight->getPhotoRelPath($photoNum).
				"' target=_blank><img src='".$flight->getPhotoRelPath($photoNum).".icon.jpg' border=0></a>";
	}		
}

// add support for google maps
// see the config options 
$localMap="";
$googleMap="";
示例#12
0
$mail->Password = '******';
// SMTP password
$mail->SMTPSecure = 'tls';
// Enable encryption, 'ssl' also accepted
$mail->Port = 587;
//Set the SMTP port number - 587 for authenticated TLS
$mail->setFrom('*****@*****.**', 'Kaylene');
//Set who the message is to be sent from
//$mail->addReplyTo('*****@*****.**', 'First Last');  //Set an alternative reply-to address
$mail->addAddress($email, $name);
// Add a recipient
//$mail->addAddress('*****@*****.**');               // Name is optional
//$mail->addCC('*****@*****.**');
//$mail->addBCC('*****@*****.**');
$mail->WordWrap = 50;
// Set word wrap to 50 characters
//$mail->addAttachment('/usr/labnol/file.doc');         // Add attachments
//$mail->addAttachment('/images/image.jpg', 'new.jpg'); // Optional name
$mail->isHTML(true);
// Set email format to HTML
// $mail->SMTPDebug = 2;
$mail->Subject = $subject_line;
$variable['message'] = $message;
$mail->Body = get_include_contents('mail/confirmation.php', $variable);
$mail->Send();
if (!$mail->send()) {
    echo 'Message could not be sent.';
    echo 'Mailer Error: ' . $mail->ErrorInfo;
    exit;
}
echo 'Message has been sent';
 public function importStylesheet($filename)
 {
     $this->addStyle(get_include_contents($filename));
 }
示例#14
0
function enviaEmail($tipoEmail, $nomePessoa, $emailPessoa, $novaSenha = null, $idPedido = null, $despacho = null, $cupomDesconto = null)
{
    if ($tipoEmail == 'novaSenha') {
        $mensagem = $_SERVER['DOCUMENT_ROOT'] . '/emails/nova-senha.php';
        $assunto = utf8_decode('Solicitação de nova senha');
        $_POST['nomePessoa'] = $nomePessoa;
        $_POST['novaSenha'] = $novaSenha;
    } else {
        if ($tipoEmail == 'situacaoPedido') {
            $mensagem = $_SERVER['DOCUMENT_ROOT'] . '/emails/pedido-realizado.php';
            $assunto = utf8_decode('Acompanhamento de Pedido');
            $_POST['idPedido'] = $idPedido;
            $_POST['despacho'] = $despacho;
        } else {
            if ($tipoEmail == 'cupomDesconto') {
                $mensagem = $_SERVER['DOCUMENT_ROOT'] . '/emails/cupom-desconto.php';
                $assunto = utf8_decode('Cupom Desconto');
                $_POST['cupomDesconto'] = $cupomDesconto;
            } else {
                if ($tipoEmail == 'divulgaListaCasamento') {
                    $query = "SELECT \r\n\t\t\t\t\t\tLICA.CONJUGE1+' & '+LICA.CONJUGE2 NOIVOS,\r\n\t\t\t\t\t\tLICA.URL,\r\n\t\t\t\t\t\tLICA.FOTO_CAPA\r\n\t\t\t\t\tFROM\r\n\t\t\t\t\t\te_LISTA_CASAMENTO LICA\r\n\t\t\t\t\tWHERE\r\n\t\t\t\t\t\tLICA.ID_LISTA_CASAMENTO = " . $nomePessoa . "";
                    $valueQuery = $mysqli->ConsultarSQL($query);
                    $mensagem = $_SERVER['DOCUMENT_ROOT'] . '/emails/lista-casamento-email-divulgar.php';
                    $assunto = utf8_decode('Lista de Casamento de ' . $valueQuery[0]['NOIVOS']);
                    $_POST['nomeNoivos'] = $valueQuery[0]['NOIVOS'];
                    $_POST['urlListaCasamento'] = $valueQuery[0]['URL'];
                    $_POST['fotoCapa'] = $valueQuery[0]['FOTO_CAPA'];
                }
            }
        }
    }
    $html = get_include_contents($mensagem, $_POST);
    //printr($html);
    //Create a new PHPMailer instance
    $mail = new PHPMailer();
    //Tell PHPMailer to use SMTP
    $mail->IsSMTP();
    //Enable SMTP debugging
    // 0 = off (for production use)
    // 1 = client messages
    // 2 = client and server messages
    $mail->SMTPDebug = 0;
    //Ask for HTML-friendly debug output
    $mail->Debugoutput = 'html';
    //Set the hostname of the mail server
    $mail->Host = 'smtp.gmail.com';
    //Set the SMTP port number - 587 for authenticated TLS, a.k.a. RFC4409 SMTP submission
    $mail->Port = 587;
    //Set the encryption system to use - ssl (deprecated) or tls
    $mail->SMTPSecure = 'tls';
    //Whether to use SMTP authentication
    $mail->SMTPAuth = true;
    //Username to use for SMTP authentication - use full email address for gmail
    $mail->Username = "******";
    //Password to use for SMTP authentication
    $mail->Password = "******";
    //Set who the message is to be sent from
    $mail->SetFrom('*****@*****.**', 'Atendimento Comlines');
    //Set an alternative reply-to address
    $mail->AddReplyTo('*****@*****.**', 'Atendimento Comlines');
    //Set the subject line
    $mail->Subject = 'Atendimento Comlines - ' . $assunto;
    //Read an HTML message body from an external file, convert referenced images to embedded, convert HTML into a basic plain-text alternative body
    $mail->MsgHTML($html, dirname(__FILE__));
    //Replace the plain text body with one created manually
    $mail->AltBody = $assunto;
    //Attach an image file
    //$mail->AddAttachment('images/phpmailer_mini.gif');
    //Set who the message is to be sent to
    if ($tipoEmail != 'divulgaListaCasamento') {
        $mail->AddAddress($emailPessoa, $nomePessoa);
    } else {
        $emailPessoa = explode(',', $emailPessoa);
        foreach ($emailPessoa as $value) {
            $mail->AddAddress($value, '');
        }
    }
    if ($mail->Send()) {
        return true;
    } else {
        return false;
    }
    $mail->ClearAddresses();
}
示例#15
0
function send_confirmation()
{
    global $link, $groupx_ClassTable;
    function get_include_contents($filename, $variablesToMakeLocal)
    {
        extract($variablesToMakeLocal);
        if (is_file($filename)) {
            ob_start();
            include $filename;
            return ob_get_clean();
        }
        return false;
    }
    $emailData = $_POST['emailData'];
    foreach ($emailData as $key) {
        $email = json_decode($key);
    }
    $user_email = $email->user_email;
    $eventID = $email->class_id;
    echo $user_email;
    $str_query = 'SELECT equipment FROM  `trilakes_groupx_classes`  WHERE `event_id` = ' . $eventID;
    $obj_result = mysqli_query($link, $str_query);
    while ($arr_line = mysqli_fetch_array($obj_result, MYSQLI_ASSOC)) {
        $arr_content = $arr_line;
    }
    $equipt = $arr_content['equipment'];
    $mail = new PHPMailer();
    $mail->isSMTP();
    // Set mailer to use SMTP
    $mail->Host = 'smtp.gmail.com';
    // Specify main and backup server
    $mail->SMTPAuth = true;
    // Enable SMTP authentication
    $mail->Username = '******';
    // SMTP username
    $mail->Password = '******';
    // SMTP password
    $mail->SMTPSecure = 'tls';
    // Enable encryption, 'ssl' also accepted
    $mail->Port = 587;
    //Set the SMTP port number - 587 for authenticated TLS
    $mail->setFrom('*****@*****.**', 'PPYMCA');
    //Set who the message is to be sent from
    //$mail->addReplyTo('*****@*****.**', 'First Last');  //Set an alternative reply-to address
    $mail->addAddress($email->user_email, $_SESSION['user_name']);
    // Add a recipient
    //$mail->addAddress('*****@*****.**');               // Name is optional
    //$mail->addCC('*****@*****.**');
    //$mail->addBCC('*****@*****.**');
    $mail->WordWrap = 50;
    // Set word wrap to 50 characters
    //$mail->addAttachment('/usr/labnol/file.doc');         // Add attachments
    //$mail->addAttachment('/images/image.jpg', 'new.jpg'); // Optional name
    $mail->isHTML(true);
    // Set email format to HTML
    // $mail->SMTPDebug = 2;
    $mail->Subject = 'GroupX Workout Confirmation';
    $variable['equipment'] = $equipt;
    $variable['instructor'] = $email->instructor;
    $variable['startTime'] = $email->startTime;
    $variable['className'] = $email->className;
    $variable['user_name'] = $_SESSION['user_name'];
    $mail->Body = get_include_contents('confirmation.php', $variable);
    $mail->Send();
    if (!$mail->send()) {
        echo 'Message could not be sent.';
        echo 'Mailer Error: ' . $mail->ErrorInfo;
        exit;
    }
    echo 'Message has been sent';
}
function more_fields_write_js()
{
    $dir = plugins_url() . '/more-fields/images/';
    $js = get_include_contents('more-fields-js.php');
    return $js;
}
\tfunction fUpdateContent(strC) {
\t\tvar ajax = new Ajax();
\t\tajax.responseType = Ajax.FBML;
\t\tajax.ondone = function(data) {
\t\t\tdocument.getElementById('dynamic').setInnerFBML(data);
\t\t\tFacebook.setPublishStatus(true);
\t\t}

\t\tajax.requireLogin = 1;
\t\tvar params = {'c':strC};
\t\tajax.post("{$strURL}{$strSCRIPT}",params);
\t}

\tfunction do_hello() {
\t\tvar dialog= new Dialog().showMessage('Dialog', 'Hello World.');
\t}
\t</script>

END;
$strResponse = "NO_METHOD?";
echo $_POST['method'];
if ($_POST['method'] == 'publisher_getFeedStory') {
    $templateid = '35834998919';
    $tokens = array("url" => "<a href='http://apps.facebook.com/birthdaybudy/'>Birthday Card</a>", "card" => "");
    $strResponse = sprintf($strJSON, json_encode('huh'), 'publisher_getFeedStory');
    $target_ids = array();
    $facebook->api_client->feed_publishUserAction($templateid, json_encode($tokens), implode(',', $target_ids), $body_general);
} else {
    $strResponse = sprintf($strJSON, json_encode($strContent . get_include_contents($strSCRIPT)), 'publisher_getInterface');
    echo $strResponse;
}
<?php

include 'code/config.php';
$messages = array();
// Include core functions
if (file_exists(PATH_CODE . 'functions.php')) {
    include PATH_CODE . 'functions.php';
} else {
    $messages[] = 'Core functions not found!';
}
// Include theme functions
if (file_exists(UNIX_THEME . 'functions.php')) {
    include UNIX_THEME . 'functions.php';
}
// Include theme template
if (file_exists(UNIX_THEME . 'template.php')) {
    $buildHtml = get_include_contents(UNIX_THEME . 'template.php');
} else {
    $messages[] = 'Theme template not found!';
}
echo $buildHtml;
$myFile = 'index.html';
$fh = fopen($myFile, 'w') or die("I cannot open the 'index.html' file!");
fwrite($fh, $buildHtml);
fclose($fh);
示例#19
0
validate($_POST, $rules);
//Connect to database
require_once $_SERVER['DOCUMENT_ROOT'] . '/db/db_inc.php';
// make sure email does not already exist in personaldetails
if ($db->query("SELECT email FROM personalDetails WHERE email = '" . $_POST['email'] . "'")->num_rows > 0) {
    die("Email already registered. Please try with a different email.");
}
// make sure username does not already exist in userlogon
if ($db->query("SELECT username FROM userlogon WHERE username = '******'username'] . "'")->num_rows > 0) {
    die("Username is already taken");
}
//insert into personalDetails
$sql = "INSERT INTO personaldetails (firstName, lastName, email, DOB) VALUES ('" . $_POST['fname'] . "', '" . $_POST['lname'] . "', '" . $_POST['email'] . "', '" . $_POST['dob'] . "')";
if (!$db->query($sql)) {
    die("There seems to be a problem on our side. Please try again later. ");
}
//insert in to userlogon
$personID = $db->insert_id;
$hash = password_hash(rand(0, 1000), PASSWORD_DEFAULT);
$password = password_hash($_POST['password'], PASSWORD_DEFAULT);
$sql = "INSERT INTO userlogon VALUES ('" . $_POST['username'] . "','{$password}', {$personID}, 'S', 'E', '{$hash}',0)";
if (!$db->query($sql)) {
    die("There seems to be a problem on our side. Please try again later. ");
}
$db->close();
//get_include_contents function
include 'php/filecontents.php';
//send mail
include_once 'mailer/sendmessage.php';
sendMessage($_POST['email'], $_POST['fname'], "Thanks for registering", get_include_contents('templates/registerTemplate.php'));
echo 0;
示例#20
0
				<h1 class="title">File Checker</h1>

                  <div style="padding:15px; line-height:26px; margin-top:10px; margin-bottom:20px; background-color:#FFFFCC; border:2px dotted #CCCC33;">
                    <strong>If there is a fatal error below then your files were not uploaded properly<br />
					If there are no errors below then you are good to go! (There should be a login box if it worked)
                    </strong><br />
                  </div>

					<?php
                    	$files = array('a','b','check-user','footer','functions','graphs-guts','graphs','header','index','manager','quick-start','reports','speed-fix','update','api/adwords','api/runreport');
						
				
						
						foreach($files as $key => $value) {						
						    			           
						   get_include_contents($value.'.php');		
						
						}
						
					
					?>
                    
                   												
                    
                    
<br />




<?php
示例#21
0
 public static function OutputTemplate()
 {
     uEvents::TriggerEvent('BeforeOutputTemplate');
     if (!self::UsingTemplate()) {
         ob_end_clean();
         echo utopia::GetVar('content');
         return;
     }
     if (isset($_GET['inline']) && !is_numeric($_GET['inline'])) {
         $_GET['inline'] = 0;
     }
     if (self::UsingTemplate(TEMPLATE_BLANK) || isset($_GET['inline']) && $_GET['inline'] == 0) {
         $template = utopia::GetVar('content');
     } else {
         $tCount = -1;
         // do all by default
         if (isset($_GET['inline'])) {
             $tCount = $_GET['inline'] - 1;
         }
         $template = '';
         $css = self::GetTemplateCSS();
         foreach ($css as $cssfile) {
             uCSS::LinkFile($cssfile);
         }
         // first get list of parents
         $templates = array();
         $templateDir = utopia::GetTemplateDir(true);
         if (!file_exists($templateDir)) {
             $templateDir = utopia::GetAbsolutePath($templateDir);
         }
         if (file_exists($templateDir)) {
             $templates[] = $templateDir;
         }
         while ($tCount-- && file_exists($templateDir . '/template.ini')) {
             $inifile = parse_ini_file($templateDir . '/template.ini');
             if (!isset($inifile['parent'])) {
                 break;
             }
             if (file_exists(PATH_ABS_ROOT . $inifile['parent'])) {
                 $templateDir = PATH_ABS_ROOT . $inifile['parent'];
             } else {
                 $templateDir = dirname($templateDir) . '/' . $inifile['parent'];
             }
             $templates[] = $templateDir;
         }
         foreach ($templates as $templateDir) {
             // set templatedir
             self::SetVar('templatedir', self::GetRelativePath($templateDir));
             $templatePath = $templateDir . '/template.php';
             $template = get_include_contents($templatePath);
             // mergevars
             while (self::MergeVars($template)) {
             }
             // setvar
             self::SetVar('content', $template);
         }
         if (!$template) {
             $template = '{utopia.content}';
         }
     }
     ob_end_clean();
     while (self::MergeVars($template)) {
     }
     $template = str_replace('<head>', '<head>' . '<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>', $template);
     // Make all resources secure
     if (self::IsRequestSecure()) {
         $template = str_replace('http://' . self::GetDomainName(), 'https://' . self::GetDomainName(), $template);
     }
     do {
         if (self::UsingTemplate() && class_exists('DOMDocument')) {
             libxml_use_internal_errors(true);
             $doc = new DOMDocument();
             $doc->formatOutput = false;
             $doc->preserveWhiteSpace = true;
             $doc->validateOnParse = true;
             if (!$doc->loadHTML('<?xml encoding="UTF-8">' . utf8_decode($template))) {
                 break;
             }
             $isSnip = stripos($template, '<html') === false;
             $doc->encoding = 'UTF-8';
             // no html tag?  break out.
             if (!$doc->getElementsByTagName('html')->length) {
                 break;
             }
             // remove multiple xmlns attributes
             $doc->documentElement->removeAttributeNS(NULL, 'xmlns');
             // assert BODY tag
             if (!$doc->getElementsByTagName('body')->length) {
                 $node = $doc->createElement("body");
                 $doc->getElementsByTagName('html')->item(0)->appendChild($node);
             }
             // assert HEAD tag
             if (!$doc->getElementsByTagName('head')->length) {
                 // create head node
                 $node = $doc->createElement("head");
                 $body = $doc->getElementsByTagName('body')->item(0);
                 $newnode = $body->parentNode->insertBefore($node, $body);
             }
             // add HEAD children
             $head = $doc->getElementsByTagName('head')->item(0);
             // set title
             if (!$head->getElementsByTagName('title')->length) {
                 $node = $doc->createElement('title');
                 $node->appendChild($doc->createTextNode(utopia::GetTitle(true)));
                 $head->appendChild($node);
             }
             if (utopia::GetDescription(true)) {
                 $node = $doc->createElement('meta');
                 $node->setAttribute('name', 'description');
                 $node->setAttribute('content', utopia::GetDescription(true));
                 $head->appendChild($node);
             }
             if (utopia::GetKeywords(true)) {
                 $node = $doc->createElement('meta');
                 $node->setAttribute('name', 'keywords');
                 $node->setAttribute('content', utopia::GetKeywords(true));
                 $head->appendChild($node);
             }
             $node = $doc->createElement('meta');
             $node->setAttribute('name', 'generator');
             $node->setAttribute('content', 'uCore PHP Framework');
             $head->appendChild($node);
             // template is all done, now lets run a post process event
             try {
                 uEvents::TriggerEvent('ProcessDomDocument', null, array(&$doc));
             } catch (Exception $e) {
                 uErrorHandler::EchoException($e);
             }
             $ctNode = null;
             foreach ($head->getElementsByTagName('meta') as $meta) {
                 if ($meta->hasAttribute('http-equiv') && strtolower($meta->getAttribute('http-equiv')) == 'content-type') {
                     $ctNode = $meta;
                     break;
                 }
             }
             if (!$ctNode) {
                 $ctNode = $doc->createElement('meta');
                 $head->appendChild($ctNode);
             }
             $ctNode->setAttribute('http-equiv', 'content-type');
             $ctNode->setAttribute('content', 'text/html;charset=' . CHARSET_ENCODING);
             if ($ctNode !== $head->firstChild) {
                 $head->insertBefore($ctNode, $head->firstChild);
             }
             $doc->normalizeDocument();
             if (strpos(strtolower($doc->doctype->publicId), ' xhtml ')) {
                 $template = $doc->saveXML();
             } else {
                 $template = $doc->saveHTML();
             }
             $template = preg_replace('/<\\?xml encoding="UTF-8"\\??>\\n?/i', '', $template);
             if ($isSnip && !self::$noSnip) {
                 $template = preg_replace('/.*<body[^>]*>\\s*/ims', '', $template);
                 // remove everything up to and including the body open tag
                 $template = preg_replace('/\\s*<\\/body>.*/ims', '', $template);
                 // remove everything after and including the body close tag
             }
         }
     } while (false);
     while (self::MergeVars($template)) {
     }
     if (isset($_GET['callback'])) {
         $output = json_encode(array('title' => self::GetTitle(true), 'content' => $template));
         header('Content-Type: application/javascript');
         echo $_GET['callback'] . '(' . $output . ')';
         return;
     }
     echo $template;
 }
示例#22
0
$pageBody = "<h1>Index</h1>";
$pageTitle = "Index";
$pageData = null;
$page = filter_input(INPUT_GET, "page");
$pageId = filter_input(INPUT_GET, "pageId");
$userGet = filter_input(INPUT_GET, "user");
//name
if ($page) {
    switch ($page) {
        case "createpage":
            break;
        default:
            break;
    }
    $pageTitle = $page;
    $pageBody = get_include_contents("pages/" . $page . ".php");
    $displayMode = 1;
} else {
    if ($pageId && filter_var($pageId, FILTER_VALIDATE_INT)) {
        //Go to that page
        $pageData = pp_get_page($pageId);
        if ($pageData) {
            $pageTitle = $pageData['pageName'];
            $pageBody = $pageData['content'];
            $displayMode = 2;
        }
    } else {
        if ($userGet) {
            $uid = pp_get_user_details_name($userGet)['activeMenu'];
            if ($uid) {
                $p = pp_get_menu($uid);
示例#23
0
function register()
{
    global $link;
    function get_include_contents($filename, $variablesToMakeLocal)
    {
        extract($variablesToMakeLocal);
        if (is_file($filename)) {
            ob_start();
            include $filename;
            return ob_get_clean();
        }
        return false;
    }
    /******************* Filtering/Sanitizing Input *****************************
    	This code filters harmful script code and escapes data of all POST data
    	from the user submitted form.
    	*****************************************************************/
    foreach ($_POST as $key => $value) {
        $data[$key] = $value;
    }
    /********************* RECAPTCHA CHECK *******************************
    	This code checks and validates recaptcha
    	****************************************************************/
    // require_once('recaptchalib.php');
    //      $resp = recaptcha_check_answer ($privatekey,
    //                                      $_SERVER["REMOTE_ADDR"],
    //                                      $_POST["recaptcha_challenge_field"],
    //                                      $_POST["recaptcha_response_field"]);
    //      if (!$resp->is_valid) {
    //        die ("<h3>Image Verification failed!. Go back and try again.</h3>" .
    //            "(reCAPTCHA said: " . $resp->error . ")");
    //      }
    /************************ SERVER SIDE VALIDATION **************************************/
    /********** This validation is useful if javascript is disabled in the browswer ***/
    if (empty($data['user_name']) || strlen($data['user_name']) < 4) {
        echo "hello4";
        $err[] = "ERROR - Invalid name. Please enter atleast 3 or more characters for your name";
        //header("Location: register.php?msg=$err");
        //exit();
    }
    // Validate User Name
    if (!isUserID($data['user_username'])) {
        echo "hello3";
        $err[] = "ERROR - Invalid user name. It can contain alphabet, number and underscore.";
        //header("Location: register.php?msg=$err");
        //exit();
    }
    // Validate Email
    if (!isEmail($data['user_email'])) {
        echo "hello1";
        $err[] = "ERROR - Invalid email address.";
        //header("Location: register.php?msg=$err");
        //exit();
    }
    // Check User Passwords
    //	if (!checkPwd($data['pass'],$data['pass2'])) {echo ("hello2");
    //	$err[] = "ERROR - Invalid Password or mismatch. Enter 5 chars or more";
    //header("Location: register.php?msg=$err");
    //exit();
    //	}
    $user_ip = $_SERVER['REMOTE_ADDR'];
    // stores sha1 of password
    $sha1pass = PwdHash($data['pass']);
    // Automatically collects the hostname or domain  like example.com)
    $host = $_SERVER['HTTP_HOST'];
    $host_upper = strtoupper($host);
    $path = rtrim(dirname($_SERVER['PHP_SELF']), '/\\');
    // Generates activation code simple 4 digit number
    $activ_code = rand(1000, 9999);
    $user_email = $data['user_email'];
    $user_name = $data['user_name'];
    /************ USER EMAIL CHECK ************************************
    	This code does a second check on the server side if the email already exists. It 
    	queries the database and if it has any existing email it throws user email already exists
    	*******************************************************************/
    $rs_duplicate = mysqli_query($link, "select count(*) as total from users where user_email='{$user_email}' OR  user_name='{$user_name}'") or die(mysql_error());
    list($total) = mysqli_fetch_row($rs_duplicate);
    if ($total > 2) {
        echo "hello5";
        $err[] = "ERROR - The username/email already exists. Please try again with different username and email.";
        //header("Location: register.php?msg=$err");
        //exit();
    }
    /***************************************************************************/
    if (empty($err)) {
        $sql_insert = "INSERT into `users`(`full_name`,`user_email`,`pwd`,`date`,`users_ip`,`activation_code`,`user_name`)\n\t\t\t\tVALUES('{$data['user_name']}','{$user_email}','{$sha1pass}',now(),'{$user_ip}','{$activ_code}','{$user_name}')";
        mysqli_query($link, $sql_insert) or die("Insertion Failed:" . mysql_error());
        $user_id = mysqli_insert_id($link);
        $md5_id = md5($user_id);
        mysqli_query($link, "update users set md5_id='{$md5_id}' where id='{$user_id}'");
        //	echo "<h3>Thank You</h3> We received your submission.";
        $mail = new PHPMailer();
        $mail->isSMTP();
        // Set mailer to use SMTP
        $mail->Host = 'smtp.gmail.com';
        // Specify main and backup server
        $mail->SMTPAuth = true;
        // Enable SMTP authentication
        $mail->Username = '******';
        // SMTP username
        $mail->Password = '******';
        // SMTP password
        $mail->SMTPSecure = 'tls';
        // Enable encryption, 'ssl' also accepted
        $mail->Port = 587;
        //Set the SMTP port number - 587 for authenticated TLS
        $mail->setFrom('*****@*****.**', 'Lake Nona');
        //Set who the message is to be sent from
        //$mail->addReplyTo('*****@*****.**', 'First Last');  //Set an alternative reply-to address
        $mail->addAddress($user_email, $user_name);
        // Add a recipient
        //$mail->addAddress('*****@*****.**');               // Name is optional
        //$mail->addCC('*****@*****.**');
        //$mail->addBCC('*****@*****.**');
        $mail->WordWrap = 50;
        // Set word wrap to 50 characters
        //$mail->addAttachment('/usr/labnol/file.doc');         // Add attachments
        //$mail->addAttachment('/images/image.jpg', 'new.jpg'); // Optional name
        $mail->isHTML(true);
        // Set email format to HTML
        // $mail->SMTPDebug = 2;
        $mail->Subject = 'GroupX onDemand Registration / Activation';
        $variable['user_username'] = $data['user_name'];
        $variable['user_name'] = $data['user_name'];
        $variable['user_email'] = $data['user_email'];
        $variable['host'] = $host;
        $variable['path'] = $path;
        $variable['activ_code'] = $activ_code;
        $variable['id'] = $md5_id;
        //$mail->Body    = 'This is the HTML message body <b>in bold!</b>';
        //$mail->AltBody = 'HEllo JIm Reydnolds this is a test';
        //Read an HTML message body from an external file, convert referenced images to embedded,
        //convert HTML into a basic plain-text alternative body
        $mail->Body = get_include_contents('registration.php', $variable);
        $mail->Send();
        $msg['errorCode'] = 1;
        echo json_encode($msg);
        exit;
    } else {
        if (!$mail->send()) {
            echo 'Message could not be sent.';
            echo 'Mailer Error: ' . $mail->ErrorInfo;
            exit;
        }
    }
}
function layout_json($filename, $arr = null)
{
    header("Pragma: no-cache");
    header("Cache-Control: no-store, no-cache, max-age=0, must-revalidate");
    return get_include_contents('tpl/json/' . $filename . '.php', $arr);
}
示例#25
0
function reset_pwd()
{
    global $link;
    function get_include_contents($filename, $variablesToMakeLocal)
    {
        extract($variablesToMakeLocal);
        if (is_file($filename)) {
            ob_start();
            include $filename;
            return ob_get_clean();
        }
        return false;
    }
    $err = array();
    $msg = array();
    foreach ($_POST as $key => $value) {
        $data[$key] = filter($value);
    }
    if (!isEmail($data['user_email'])) {
        $err[] = "ERROR - Please enter a valid email";
    }
    $user_email = $data['user_email'];
    $new_pwd = $data['pass'];
    //check if activ code and user is valid as precaution
    $pwd_reset = PwdHash($new_pwd);
    //$sha1_new = sha1($new);
    //set update sha1 of new password + salt
    mysqli_query($link, "update users set pwd='{$pwd_reset}' WHERE \n\t\t\t\t\t\t user_email='{$user_email}'") or die(mysql_error());
    $host = $_SERVER['HTTP_HOST'];
    $host_upper = strtoupper($host);
    if (empty($err)) {
        $host = $_SERVER['HTTP_HOST'];
        $host_upper = strtoupper($host);
        //send email
        $mail = new PHPMailer();
        $mail->isSMTP();
        // Set mailer to use SMTP
        $mail->Host = 'smtp.gmail.com';
        // Specify main and backup server
        $mail->SMTPAuth = true;
        // Enable SMTP authentication
        $mail->Username = '******';
        // SMTP username
        $mail->Password = '******';
        // SMTP password
        $mail->SMTPSecure = 'tls';
        // Enable encryption, 'ssl' also accepted
        $mail->Port = 587;
        //Set the SMTP port number - 587 for authenticated TLS
        $mail->setFrom('*****@*****.**', 'Lake Nona');
        //Set who the message is to be sent from
        //$mail->addReplyTo('*****@*****.**', 'First Last');  //Set an alternative reply-to address
        $mail->addAddress($user_email, $user_name);
        // Add a recipient
        //$mail->addAddress('*****@*****.**');               // Name is optional
        //$mail->addCC('*****@*****.**');
        //$mail->addBCC('*****@*****.**');
        $mail->WordWrap = 50;
        // Set word wrap to 50 characters
        //$mail->addAttachment('/usr/labnol/file.doc');         // Add attachments
        //$mail->addAttachment('/images/image.jpg', 'new.jpg'); // Optional name
        $mail->isHTML(true);
        // Set email format to HTML
        // $mail->SMTPDebug = 2;
        $mail->Subject = 'GroupX onDemand Password Recovery Link';
        $variable['user_username'] = $data['user_name'];
        $variable['user_name'] = $data['user_name'];
        $variable['user_email'] = $data['user_email'];
        $variable['host'] = $host;
        $variable['path'] = $path;
        $variable['activ_code'] = $activ_code;
        $variable['id'] = $md5_id;
        //$mail->Body    = 'This is the HTML message body <b>in bold!</b>';
        //$mail->AltBody = 'HEllo JIm Reydnolds this is a test';
        //Read an HTML message body from an external file, convert referenced images to embedded,
        //convert HTML into a basic plain-text alternative body
        $mail->Body = get_include_contents('recover.php', $variable);
        $mail->Send();
        $msg['errorCode'] = 1;
        echo json_encode($msg);
        exit;
    } else {
        if (!$mail->send()) {
            echo 'Message could not be sent.';
            echo 'Mailer Error: ' . $mail->ErrorInfo;
            exit;
        }
    }
}
示例#26
0
<?php

function get_include_contents($filename)
{
    if (is_file($filename)) {
        ob_start();
        include $filename;
        return ob_get_clean();
    }
    return false;
}
$to = 'ertest01@yahoo.fr, ejallier@cefim.eu, erwann.jallier@gmail.com, erwann.jallier@live.fr';
//Vos adresses de test
$subject = 'Un nouveau pack pour vous !';
$message = get_include_contents('index.html');
$headers = "From: \"SSW\"<*****@*****.**>\n";
//Taper ici votre adresse mail
$headers .= "Reply-To: ssw@erwannjallier.com\n";
//Pareil !!
$headers .= "Content-Type: text/html; charset=\"utf-8\"";
mail($to, $subject, $message, $headers);
示例#27
0
文件: external.php 项目: Lovinity/EQM
     $file_applications_window = line_break_replace(get_include_contents(dirname(__FILE__) . DIRECTORY_SEPARATOR . AC_FOLDER_THEMES . DIRECTORY_SEPARATOR . $theme . "/template/applications_window.php"));
     $file_notifications_tab = line_break_replace(get_include_contents(dirname(__FILE__) . DIRECTORY_SEPARATOR . AC_FOLDER_THEMES . DIRECTORY_SEPARATOR . $theme . "/template/notifications_tab.php"));
     $file_notifications_window = line_break_replace(get_include_contents(dirname(__FILE__) . DIRECTORY_SEPARATOR . AC_FOLDER_THEMES . DIRECTORY_SEPARATOR . $theme . "/template/notifications_window.php"));
     $file_mod_tab = line_break_replace(get_include_contents(dirname(__FILE__) . DIRECTORY_SEPARATOR . AC_FOLDER_THEMES . DIRECTORY_SEPARATOR . $theme . "/template/mod_tab.php"));
     $file_mod_window = line_break_replace(get_include_contents(dirname(__FILE__) . DIRECTORY_SEPARATOR . AC_FOLDER_THEMES . DIRECTORY_SEPARATOR . $theme . "/template/mod_window.php"));
     $file_mod_report = line_break_replace(get_include_contents(dirname(__FILE__) . DIRECTORY_SEPARATOR . AC_FOLDER_THEMES . DIRECTORY_SEPARATOR . $theme . "/template/mod_report.php"));
     $file_warnings_display = line_break_replace(get_include_contents(dirname(__FILE__) . DIRECTORY_SEPARATOR . AC_FOLDER_THEMES . DIRECTORY_SEPARATOR . $theme . "/template/warnings_display.php"));
     $file_chat_tab = line_break_replace(get_include_contents(dirname(__FILE__) . DIRECTORY_SEPARATOR . AC_FOLDER_THEMES . DIRECTORY_SEPARATOR . $theme . "/template/chat_tab.php"));
     $file_chat_window = line_break_replace(get_include_contents(dirname(__FILE__) . DIRECTORY_SEPARATOR . AC_FOLDER_THEMES . DIRECTORY_SEPARATOR . $theme . "/template/chat_window.php"));
     $file_buddylist_tab = line_break_replace(get_include_contents(dirname(__FILE__) . DIRECTORY_SEPARATOR . AC_FOLDER_THEMES . DIRECTORY_SEPARATOR . $theme . "/template/buddylist_tab.php"));
     $file_buddylist_window = line_break_replace(get_include_contents(dirname(__FILE__) . DIRECTORY_SEPARATOR . AC_FOLDER_THEMES . DIRECTORY_SEPARATOR . $theme . "/template/buddylist_window.php"));
     $file_maintenance_tab = line_break_replace(get_include_contents(dirname(__FILE__) . DIRECTORY_SEPARATOR . AC_FOLDER_THEMES . DIRECTORY_SEPARATOR . $theme . "/template/maintenance_tab.php"));
     $file_announcements_display = line_break_replace(get_include_contents(dirname(__FILE__) . DIRECTORY_SEPARATOR . AC_FOLDER_THEMES . DIRECTORY_SEPARATOR . $theme . "/template/announcements_display.php"));
     $file_chatrooms_tab = line_break_replace(get_include_contents(dirname(__FILE__) . DIRECTORY_SEPARATOR . AC_FOLDER_THEMES . DIRECTORY_SEPARATOR . $theme . "/template/chatrooms_tab.php"));
     $file_chatrooms_window = line_break_replace(get_include_contents(dirname(__FILE__) . DIRECTORY_SEPARATOR . AC_FOLDER_THEMES . DIRECTORY_SEPARATOR . $theme . "/template/chatrooms_window.php"));
     $file_chatrooms_room = line_break_replace(get_include_contents(dirname(__FILE__) . DIRECTORY_SEPARATOR . AC_FOLDER_THEMES . DIRECTORY_SEPARATOR . $theme . "/template/chatrooms_room.php"));
     require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . AC_FOLDER_INCLUDES . DIRECTORY_SEPARATOR . 'js/arrowchat_libraries.js';
     echo "\n\n//**********Templates**********\n";
     require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . AC_FOLDER_INCLUDES . DIRECTORY_SEPARATOR . 'js/arrowchat_templates.js';
     echo "\n\n// **********Main Script Start**********\n// http://www.arrowchat.com\n";
     require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . AC_FOLDER_INCLUDES . DIRECTORY_SEPARATOR . 'js/arrowchat_core.js';
     echo "\n\n// **********Applications Pre-loading Start**********\n";
     foreach ($apps as $val) {
         if (file_exists(dirname(__FILE__) . DIRECTORY_SEPARATOR . AC_FOLDER_APPLICATIONS . DIRECTORY_SEPARATOR . $val[2] . DIRECTORY_SEPARATOR . "preload.php")) {
             include_once dirname(__FILE__) . DIRECTORY_SEPARATOR . AC_FOLDER_APPLICATIONS . DIRECTORY_SEPARATOR . $val[2] . DIRECTORY_SEPARATOR . "preload.php";
         }
     }
 }
 echo "\n/* ArrowChat Version: " . ARROWCHAT_VERSION . " */";
 close_session();
 exit;
示例#28
0
 /**
  * getPreview -- Returns a string with a preview of the content. Default implementation runs getRenderFile() with $liberty_preview set in the context and gBitSystem set to only render the content.
  *
  * @access public
  * @return the preview string
  **/
 function getPreview()
 {
     global $gBitSystem, $gContent, $gBitSmarty, $gBitThemes;
     // Tell gBitSystem not to do modules and such
     $gBitThemes->setFormatHeader("center_only");
     // Tell the content we are previewing (in case they care)
     $gBitSmarty->assign('liberty_preview', true);
     // Save current gContent
     $oldGContent = $gContent;
     // Make us the content
     $gContent = $this;
     $ret = get_include_contents($this->getRenderFile());
     // Return gBitSystem to full render mode
     $gBitThemes->setFormatHeader("html");
     // Clear the preview flag
     $gBitSmarty->assign('liberty_preview', false);
     // Restore gContent
     $gContent = $oldGContent;
     return $ret;
 }
示例#29
0
// Load CSV into memory
global $fullcsv;
if (($handle = fopen(PROGRAM_INSTALL_PATH . MASTER_CSV_FILE_NAME, "r")) !== FALSE) {
    if (($rowdata = fgetcsv($handle, 4096, ",")) !== FALSE) {
        // This line skips the header row
        while (($rowdata = fgetcsv($handle, 4096, ",")) !== FALSE) {
            $num = count($rowdata);
            $fullcsv[] = $rowdata;
        }
        fclose($handle);
    }
} else {
    die("Can't open master csv at: " . PROGRAM_INSTALL_PATH . MASTER_CSV_FILE_NAME);
}
// Load template, pass this by value later so we don't have to read it in again
$templateHtml = get_include_contents("template.html");
// Make replacements that don't change regardless of template type but do for each site
$templateHtml = str_replace("#ga-tracking-id#", GOOGLE_ANALYTICS_ID, $templateHtml);
$templateHtml = str_replace("#header#", file_get_contents(PROGRAM_INSTALL_PATH . "header-content.html"), $templateHtml);
include "generate-js-left-nav.php";
$successArray = null;
$errorArray = null;
// This include will write out all the detail pages to the file system
include "generate-detail-pages.php";
// This include will write out all the listing pages to the file system
include "generate-list-pages.php";
// Generate the other pages
include "generate-other-pages.php";
// Generate the new htaccess file
include "generate-htaccess.php";
$endTime = date("G:i j/n/y", time());
<?php

include_once 'config.php';
include_once 'lib.php';
// Variable Declaration
$strDisplay = 'false';
$strURL = 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['SCRIPT_NAME'];
$strTemplate = '' . "\n" . '<script language="javascript" type="text/javascript">' . "\n" . '<!--' . "\n" . '' . "\n" . '	function fSet(id)' . "\n" . '	{ document.getElementById(id).setChecked(true); }' . "\n" . '	' . "\n" . '	function fUpdateContent(strCategory)' . "\n" . '	{' . "\n" . '		var ajax = new Ajax();' . "\n" . '		ajax.responseType = Ajax.FBML;' . "\n" . '		ajax.ondone = function(data) {' . "\n" . '			document.getElementById("content-wrapper").setInnerFBML(data);' . "\n" . '		}' . "\n" . '' . "\n" . '		ajax.requireLogin =1;' . "\n" . '		ajax.post("http://simplyearl.com/birthday/attachment_c.php?c=" + strCategory);' . "\n" . '	}' . "\n" . '' . "\n" . '	function fResetFlash(strID)' . "\n" . '	{' . "\n" . '		document.getElementById("flash_" + strID).setTextValue("");' . "\n" . '		var ajax = new Ajax();' . "\n" . '		ajax.responseType = Ajax.FBML;' . "\n" . '		ajax.ondone = function(data) {' . "\n" . '			document.getElementById("flash_" + strID).setInnerFBML(data);' . "\n" . '		}' . "\n" . '' . "\n" . '		ajax.requireLogin = 1;' . "\n" . '		ajax.post("http://simplyearl.com/birthday/get_swf.php?t=" + strID);' . "\n" . '	}' . "\n" . '' . "\n" . '//-->' . "\n" . '</script>' . "\n" . '' . "\n" . '<form id="content_form"></form>' . "\n" . '<div id="wrapper">' . "\n" . '' . "\n" . '	<h1>Choose A Birthday Card</h1>' . "\n" . '	<div id="content-wrapper">' . "\n" . '		%1$s' . "\n" . '	</div>' . "\n" . '</div>' . "\n" . '<!-- #wrapper -->' . "\n" . '' . "\n" . '<!-- Return URL -->' . "\n" . '<input type="hidden" name="url" value="%2$s" />' . "\n" . '' . "\n" . '<!-- Google Analytics Frame -->' . "\n" . '<fb:iframe src="http://simplyearl.com/birthday/analytics.php?t=FB:Birthday_Attachment" frameborder=0 style="height: 1px; width: 1px;"></fb:iframe>';
// Display Template
if (!isset($_POST['message_sent']) || $_POST['message_sent'] < 1) {
    // Format Return
    $strReturn = sprintf($strTemplate, get_include_contents('attachment_c.php'), $strURL);
} else {
    if (isset($_POST['t'])) {
        fRecordUser();
        fRecordAttachment();
        if (substr($_POST['t'], strlen($_POST['t']) - 3) == 'swf') {
            $strReturn = sprintf($GLOBALS['strFlash'], $_POST['t']);
        } else {
            $strReturn = sprintf($GLOBALS['strImage'], $_POST['t'], 'width="320"');
        }
    } else {
        $strReturn = 'Please Select A Birthday Card';
    }
}
echo $strReturn;