Ejemplo n.º 1
1
<?php

// Main entry for the NUnitLite website, now being moved
// to it's own location, outside of NUnit.com
// Define Home and PHP diretories
$here = dirname(__FILE__);
$php = $here . '/php';
define("HOME_DIR", "{$here}/");
// Add Home directory and PHP directory to the include path
$current_path = ini_get("include_path");
ini_set("include_path", "{$current_path}:{$here}:{$php}");
// Set HOME_PATH using the url for this page.
if (isset($_SERVER["PHP_SELF"])) {
    define("HOME_PATH", dirname($_SERVER["PHP_SELF"]) . '/');
} else {
    define("HOME_PATH", '/');
}
// Include required routines
require_once "display_page.php";
require_once "html_funcs.php";
// Get any arguments passed
$name = getarg("p", "home");
// Display the requested page
displayPage($name, array($here, "{$here}/docs", "{$here}/dev"));
Ejemplo n.º 2
1
<?php

require_once __DIR__ . '/config.inc.php';
require_once APP_PATH . '/include/page-generator.inc.php';
// TODO: might be nice to have an option to remove a previously synced ICS feed
displayPage('
	<h3>Choose Import/Export Direction</h3>
	<p>In which direction do you want to send your information>?</p>
	<ul>
		<li><a href="export.php">Export:</a> I would like to get an ICS feed of the calendar information (which I can subscribe to in Google, iCal, Outlook, etc.) for a specific course in Canvas.</li>
		<li><a href="import.php">Import:</a> I have an ICS feed (from Google, Smartsheet, iCloud, etc.) that I want to bring into a Canvas course, user or group.</li>
	</ul>
');
/**
 * Because not every script works the right way the first time, and it's handy
 * to get well-formatted error messages
 **/
function displayError($object, $isList = false, $title = null, $message = null, $debugLevel = null)
{
    if (!defined('DEBUGGING')) {
        define('DEBUGGING', DEBUGGING_DEFAULT);
    }
    if (!isset($debugLevel) || isset($debugLevel) && DEBUGGING & $debugLevel) {
        $content = '<div class="error">' . ($title ? "<h3>{$title}</h3>" : '') . ($message ? "<p>{$message}</p>" : '');
        if ($isList) {
            $content .= '<dl>';
            if (array_keys($object) !== range(0, count($object) - 1)) {
                foreach ($object as $term => $definition) {
                    $content .= "<dt>{$term}</dt><dd><pre>" . print_r($definition, true) . '</pre></dd>';
                }
            } else {
                foreach ($object as $element) {
                    $content .= '<dd><pre>' . print_r($element, true) . '</pre></dd>';
                }
            }
            $content .= '</dl>';
        } else {
            $content .= '<pre>' . print_r($object, true) . '</pre>';
        }
        $content .= '</div>';
        displayPage($content);
    }
}
Ejemplo n.º 4
0
function ConvertAndDisplayPdf(&$request)
{
    global $WikiTheme;
    if (empty($request->_is_buffering_output)) {
        $request->buffer_output(false);
    }
    $pagename = $request->getArg('pagename');
    $dest = $request->getArg('dest');
    // Disable CACHE
    $WikiTheme->DUMP_MODE = true;
    include_once "lib/display.php";
    // TODO: urldecode pagename to get rid of %20 in filename.pdf
    displayPage($request, new Template('htmldump', $request));
    $html = ob_get_contents();
    $WikiTheme->DUMP_MODE = false;
    // check hook for external converters
    if (defined('USE_EXTERNAL_HTML2PDF') and USE_EXTERNAL_HTML2PDF) {
        // See http://phpwiki.sourceforge.net/phpwiki/PhpWikiToDocBookAndPDF
        // htmldoc or ghostscript + html2ps or docbook (dbdoclet, xsltproc, fop)
        Header('Content-Type: application/pdf');
        $request->discardOutput();
        $request->buffer_output(false);
        require_once "lib/WikiPluginCached.php";
        $cache = new WikiPluginCached();
        $cache->newCache();
        $tmpfile = $cache->tempnam('pdf.html');
        $fp = fopen($tmpfile, "wb");
        fwrite($fp, $html);
        fclose($fp);
        passthru(sprintf(USE_EXTERNAL_HTML2PDF, $tmpfile));
        unlink($tmpfile);
    }
    // clean the hints errors
    global $ErrorManager;
    $ErrorManager->destroyPostponedErrors();
    if (!empty($errormsg)) {
        $request->discardOutput();
    }
}
Ejemplo n.º 5
0
include 'php/config.php';
set_time_limit(600);
$curTime = time();
global $DB;
$DB = str_replace("\"", "", $DB);
$connection_string = odbc_connect($DB, "", "");
$conn = mysql_connect('localhost', 'root', 'Summer01');
if (!$conn) {
    die('Could not connect: ' . mysql_error());
}
mysql_select_db("usi_misc", $conn);
echo "<h1>Daily Report</h1><br>";
echo "<body >";
displayHtmlHeader();
echo "<div id=\"divCallReport\" style=\"width:1150px\">";
displayPage($curDate);
echo "</div>";
displayDates();
echo "</body>";
echo "</html>";
function displayPage($date)
{
    global $DB, $connection_string, $conn;
    // ******************************************************************************************************
    // *****		 						DAILY CALL ACTIVITY REPORT 									*****
    // ******************************************************************************************************
    echo "<div id=\"tabs\" class=\"tabs\" style=\"font-size:x-small; visibility:visible\">";
    echo "<h4 style=\"font-variant: small-caps; font-size:large\">daily call center flash activity report</h4>";
    // ******************* Create All The Tabs *************************
    echo "  <ul>";
    echo "\t\t<li><a href=\"#callTotal\"<span>Total</span></a></li>";
Ejemplo n.º 6
0
		                        columns: [						                        	
		                            { field: "firstName", title: "FirstName", width: "110px" },
		                            { field: "lastName", title: "LastName", width: "110px" },
		                            { field: "phoneNumber", title: "Phone #", width: "100px" },
		                            { field: "emailAddress", title: "Email", width: "100px" },
		                            { field: "position", title: "Front/Back", width: "75px" },
									{ field: "hireDate", title: "Hired YYYY-MM-DD", width: "150px" },
		                            { field: "canLogin", title: "Manager", width: "75px" },
		                            { command: ["edit", "destroy"], title: "&nbsp;" }],
		                        editable: "popup"
		                    });
		                    		

		                    $("#bUpdatePW").click(function() {
		                    	$("#currPass").val("");
		                    	$("#newPass").val("");
		                    	$("#newPassConf").val("");
								$("#procError").hide();
								$("#updateFailed").hide();
								$("#updateSuccess").hide();
								$("#grid").hide("slow", function() {									    									
									$("#changePassword").show("slow");	    												    										
								});		    									
							});																					

		        	});
	 		</script>
	           			 		</div>';
    $sideBar = "<h3>Utilities</h3>\n\t\t\t\t\t<button id='bUpdatePW' class='lateName'>Change Password</button>";
    displayPage($sideBar, $mainPage);
}
Ejemplo n.º 7
0
    displayPage($sideBar, '<div id="box1">
			<h2 id="sName">Late Log - Select a name</h2>
						<div id="grid" style="display: none;">
							<script>
							$(document).ready(function() {																																			        
		                        var dataSource = new kendo.data.DataSource({
		                            transport: {
		                                read:  {
		                                    url: "",
		                                    dataType: "json"
		                                },
		                                update: {
		                                    url: "",
		                                    dataType: "json"
		                                },
		                                destroy: {
		                                    url: "",
		                                    dataType: "json"
		                                },
		                                create: {
		                                    url: "",
		                                    dataType: "json"
		                                },
		                                parameterMap: function(options, operation) {
		                                    if (operation !== "read" && options.models) {
		                                        return {models: kendo.stringify(options.models)};
		                                    }
		                                }
		                            },
		                            batch: true,
		                            pageSize: 10,					                          
		                            schema: {
		                                model: {
		                                    id: "uniqueID",
		                                    fields: {
		                                    	uniqueID: { editable: false, nullable: true },
		                                        memID: { editable: false, nullable: true },
		                                        name: { editable: true, validation: { required: true } },	                                        
		                                        date: { editable: true, type: "date" },
		                                        timeArrived: { editable: true, validation: { required: true } },
		                                        schedTime: { editable: true, validation: { required: true } },
		                                        managerName: { editable: true },
		                                        comments: { editable: true, validation: { required: true } }
		                                    }
		                                }
		                            }
		                        });

			                    $("#grid").kendoGrid({
			                        dataSource: dataSource,
			                        sortable: true,
			                        pageable: true,		                        
			                        height: 500,
			                        toolbar: ["create"],
			                        columns: [				                            
			                            { field: "name", title: "Employee Name", width: "120px" },
			                            { field: "date", title: "Date", format: "{0:MM/dd/yyyy}", width: "90px" },
			                            { field: "timeArrived", title: "Time Arrived", width: "100px" },
			                            { field: "schedTime", title: "Sched. Arrival", width: "110px" },
			                            { field: "managerName", title: "Manager Name", width: "115px" },
			                            { field: "comments", title: "Comments", width: "140px",editor: textareaEditor },		                            
			                            { command: ["edit", "destroy"], title: "&nbsp;"}],
			                        editable: "popup"
			                    });	

			                    $(".lateName").click(function () {
			                    		
			                    	$("#sName").html("Late Log - " + $(this).html());	
			                    	$("#grid").show();			
									var grid = $("#grid").data("kendoGrid");
									grid.dataSource.transport.options.read.url = "/modules/getLate.php?id=" + $(this).attr("value") + "&q=1";
									grid.dataSource.transport.options.update.url = "/modules/getLate.php?id=" + $(this).attr("value") + "&q=2"; 
									grid.dataSource.transport.options.destroy.url = "/modules/getLate.php?id=" + $(this).attr("value") + "&q=3"; 
									grid.dataSource.transport.options.create.url = "/modules/getLate.php?id=" + $(this).attr("value") + "&q=4"; 
									dataSource.read();					        					    		
								});

			                    function textareaEditor(container, options) {
										    	$("<textarea data-bind=\\"value: " + options.field + "\\" cols=\\"19\\" rows=\\"4\\"></textarea>")
		        								.appendTo(container);
								}													        					    												
							});
						</script>
						</div>
						</div>');
Ejemplo n.º 8
0
}
$include_file = "php" . KSESTEST_VER . ".class.kses.php";
if (file_exists($include_file) && is_readable($include_file)) {
    include_once $include_file;
} else {
    $message = array("Error:  Unable to find '" . $include_file . "'.", "Please check your include path and make sure the file is available.", "Path: " . ini_get('include_path'));
    displayPage(array('title' => 'Unable to include ' . $include_file, 'message' => $message));
    exit;
}
$kses_type = "kses" . KSESTEST_VER;
$myKses = new $kses_type();
$test_text = array();
$test_text = test1_protocols($myKses);
$test_text = array_merge($test_text, test1_html($myKses));
$test_text = array_merge($test_text, test1_kses($myKses));
displayPage(array('title' => 'New Test', 'message' => $test_text));
function test1_kses(&$myKses)
{
    $out = array(output_hr(), "Testing current configuration");
    $test_tags = array('<a href="http://www.chaos.org/">www.chaos.org</a>', '<a name="X">Short \'a name\' tag</a>', '<td colspan="3" rowspan="5">Foo</td>', '<td rowspan="2" class="mugwump" style="background-color: rgb(255, 204 204);">Bar</td>', '<td nowrap>Very Long String running to 1000 characters...</td>', '<td bgcolor="#00ff00" nowrap>Very Long String with a blue background</td>', '<a href="proto1://www.foo.com">New protocol test</a>', '<img src="proto2://www.foo.com" />', '<a href="javascript:javascript:javascript:javascript:javascript:alert(\'Boo!\');">bleep</a>', '<a href="proto4://abc.xyz.foo.com">Another new protocol</a>', '<a href="proto9://foo.foo.foo.foo.foo.org/">Test of "proto9"</a>', '<td width="75">Bar!</td>', '<td width="200">Long Cell</td>');
    $out_li = array();
    // Keep only allowed HTML from the presumed 'form'.
    foreach ($test_tags as $tag) {
        $temp = $myKses->Parse($tag);
        $check = $temp == $tag ? true : false;
        $text = $temp == $tag ? 'pass' : 'fail';
        $li_text = output_testresult($check, $text) . output_newline();
        $li_text .= "Input: &nbsp;" . output_translate($tag) . output_newline();
        $li_text .= "Output: " . output_translate($temp);
        if (KSESTEST_ENV == 'CLI') {
            $li_text .= output_newline();
Ejemplo n.º 9
0
    $tracker['type'] = isset($pref['tracker_default_type']) ? $pref['tracker_default_type'] : MAX_CONNECTION_TYPE_SALE;
    $tracker['linkcampaigns'] = $pref['tracker_link_campaigns'] == true ? 't' : 'f';
    $tracker['description'] = '';
    $tracker['clientid'] = $clientid;
}
/*-------------------------------------------------------*/
/* MAIN REQUEST PROCESSING                               */
/*-------------------------------------------------------*/
//build form
$trackerForm = buildTrackerForm($tracker);
if ($trackerForm->validate()) {
    //process submitted values
    processForm($trackerForm);
} else {
    //either validation failed or form was not submitted, display the form
    displayPage($tracker, $trackerForm);
}
/*-------------------------------------------------------*/
/* Build form                                            */
/*-------------------------------------------------------*/
function buildTrackerForm($tracker)
{
    $form = new OA_Admin_UI_Component_Form("trackerform", "POST", $_SERVER['SCRIPT_NAME']);
    $form->forceClientValidation(true);
    $form->addElement('hidden', 'trackerid', $tracker['trackerid']);
    $form->addElement('hidden', 'clientid', $tracker['clientid']);
    $form->addElement('hidden', 'move', $tracker['move']);
    $form->addElement('header', 'basic_info', $GLOBALS['strTrackerInformation']);
    $form->addElement('text', 'trackername', $GLOBALS['strName']);
    $form->addElement('text', 'description', $GLOBALS['strDescription']);
    $types = $GLOBALS['_MAX']['CONN_TYPES'];
Ejemplo n.º 10
0
					</h2>
					<ul class="imageList">
						<li class="first">
							<h3>Cleanliness and Maintenance</h3>
							<!--<img class="left" src="images/pic2.jpg" width="60" height="60" alt="" /> -->
							' . htmlspecialchars_decode(stripslashes($cleanMaint)) . '
						</li>
						<li>
							<h3>Speed of Service and Taste of Food</h3>
							<!--<img class="left" src="images/pic2.jpg" width="60" height="60" alt="" /> -->
							' . htmlspecialchars_decode(stripslashes($sosAndTof)) . '
						</li>
						<li class="last">
							<h3>Service</h3>
							<!--<img class="left" src="images/pic2.jpg" width="60" height="60" alt="" /> -->
							' . htmlspecialchars_decode(stripslashes($service)) . '
						</li>
					</ul>	
				</div>
				<div id="box3">
					<h2>
						Leadership Meetings
					</h2>' . htmlspecialchars_decode(stripslashes($data['leaderShipNotes'])) . '</div>
				<br />
				<div id="box4">
					<h2>
						Notes
					</h2>' . htmlspecialchars_decode(stripslashes($data['notes'])) . '</div>
		';
    displayPage($sideNav, $mainPage);
}
Ejemplo n.º 11
0
 * the terms of any one of the MPL, the GPL or the LGPL.
 *
 * ***** END LICENSE BLOCK ***** */
require_once '../config.inc.php';
require_once $config['base_path'] . '/includes/iolib.inc.php';
require_once $config['base_path'] . '/includes/db.inc.php';
require_once $config['base_path'] . '/includes/contrib/smarty/libs/Smarty.class.php';
require_once $config['base_path'] . '/includes/security.inc.php';
printheaders();
if (!isset($_SESSION['login']) || $_SESSION['login'] != true) {
    if (isset($_POST['do_login'])) {
        $login = false;
        $db = NewDBConnection($config['db_dsn']);
        $db->SetFetchMode(ADODB_FETCH_ASSOC);
        $login = $securitylib->login($_POST['username'], $_POST['password']);
        $db->Close();
        if ($login === true) {
            header('Location: ' . $config['base_url']);
            exit;
        }
        $content = initializeTemplate();
        $content->assign('error', 'Incorrect Username or Password');
    }
    if (!isset($content)) {
        $content = initializeTemplate();
    }
    displayPage($content, 'login', 'login.tpl');
    exit;
} else {
    header('Location: ' . $config['base_url']);
}
Ejemplo n.º 12
0
            if ($blog->id) {
                $blog->content = $edit;
                // Save to database
                R::store($blog);
            } else {
                $errors[] = "The ID is incorrect";
            }
        } else {
            $errors[] = "Your password was typed in incorrectly";
        }
    } else {
        if (!$wantsToMakeANewBlog) {
            $errors[] = "Ensure you filled out all of the details in the edit fields";
        }
    }
    displayPage('admin_post.twig', array('errors' => $errors));
});
// URL routing handlers are now installed; try to dispatch the request
$klein->dispatch();
//================================================================================
// Functions
//================================================================================
/*
 * Generic page display function, written by http://github.com/dwhinham and modified 
 * by myself.
 */
function displayPage($template, $extraVars)
{
    global $twig;
    global $klein;
    $twigVars = array();
Ejemplo n.º 13
0
        $aAgency['contact'] = '';
        $aAgency['email'] = '';
        $aAgency['logout_url'] = '';
    }
}
/*-------------------------------------------------------*/
/* MAIN REQUEST PROCESSING                               */
/*-------------------------------------------------------*/
//build agency form
$agencyForm = buildAgencyForm($aAgency);
if ($agencyForm->validate()) {
    //process submitted values
    processForm($aAgency, $agencyForm);
} else {
    //either validation failed or form was not submitted, display the form
    displayPage($aAgency, $agencyForm);
}
/*-------------------------------------------------------*/
/* Build form                                            */
/*-------------------------------------------------------*/
function buildAgencyForm($aAgency)
{
    $form = new OA_Admin_UI_Component_Form("agencyform", "POST", $_SERVER['SCRIPT_NAME']);
    $form->forceClientValidation(true);
    $form->addElement('hidden', 'agencyid', $aAgency['agencyid']);
    $form->addElement('header', 'header_basic', $GLOBALS['strBasicInformation']);
    $form->addElement('text', 'name', $GLOBALS['strName']);
    $form->addElement('text', 'contact', $GLOBALS['strContact']);
    $form->addElement('text', 'email', $GLOBALS['strEMail']);
    //we want submit to be the last element in its own separate section
    $form->addElement('controls', 'form-controls');
Ejemplo n.º 14
0
					<li>
						<a href="#">Diam porta at sed tortor</a>
					</li>
					<li>
						<a href="#">Rutrum orci amet et lorem</a>
					</li>
					<li>
						<a href="#">Convallis sodales malesuada</a>
					</li>
					<li>
						<a href="#">Faucibus imperdiet adipiscing</a>
					</li>
					<li class="last">
						<a href="#">Dictum in amet phasellus</a>
					</li>
				</ul>';
$mainContent = '<div id="box1">
						<h2>
							Team Member Information
						</h2>
						<div id="grid">								
							<script>
				                $(document).ready(function () {
				                    
				                });
					 		</script>
						</div>
						</div>
						';
displayPage($sideBar, $mainContent);
    }
}
if (!$type) {
    if ($show_txt) {
        $type = "txt";
    }
}
$form = buildBannerForm($type, $aBanner, $oComponent, $formDisabled);
$valid = $form->validate();
if ($valid && $oComponent && $oComponent->enabled) {
    $valid = $oComponent->validateForm($form);
}
if ($valid) {
    processForm($bannerid, $form, $oComponent, $formDisabled);
} else {
    displayPage($bannerid, $campaignid, $clientid, $bannerTypes, $aBanner, $type, $form, $ext_bannertype, $formDisabled);
}
function displayPage($bannerid, $campaignid, $clientid, $bannerTypes, $aBanner, $type, $form, $ext_bannertype, $formDisabled = false)
{
    $pageName = 'advertiser-campaigns';
    $aEntities = array('clientid' => $clientid, 'campaignid' => $campaignid, 'bannerid' => $bannerid);
    $entityId = OA_Permission::getEntityId();
    $entityType = 'advertiser_id';
    $aOtherCampaigns = Admin_DA::getPlacements(array($entityType => $entityId));
    $aOtherBanners = Admin_DA::getAds(array('placement_id' => $campaignid), false);
    $advertiserId = $aEntities['clientid'];
    $campaignId = $aEntities['campaignid'];
    $bannerId = $aEntities['bannerid'];
    $entityString = _getEntityString($aEntities);
    $aOtherEntities = $aEntities;
    unset($aOtherEntities['bannerid']);
Ejemplo n.º 16
0
$DB = str_replace("\"", "", $DB);
$connection_string = odbc_connect($DB, "", "");
$conn = mysql_connect('localhost', 'root', 'Summer01');
if (!$conn) {
    die('Could not connect: ' . mysql_error());
}
mysql_select_db("usi_misc", $conn);
$date = $_GET['newDate'];
$date_timestamp = strtotime($date);
if (date('N', $date_timestamp) == 5) {
    $date_timestamp += 259200;
} else {
    $date_timestamp += 86400;
}
$datePlusOne = date('Y-m-d', $date_timestamp);
displayPage($datePlusOne);
function displayPage($date)
{
    global $DB, $connection_string, $conn, $date_timestamp;
    // ******************************************************************************************************
    // *****		 						DAILY CALL ACTIVITY REPORT 									*****
    // ******************************************************************************************************
    echo "<div id=\"tabs\" class=\"tabs\" style=\"font-size:x-small; visibility:visible\">";
    echo "<h4 style=\"font-variant: small-caps; font-size:large\">daily call center flash activity report</h4>";
    // ******************* Create All The Tabs *************************
    echo "  <ul>";
    echo "\t\t<li><a href=\"#callTotal\"<span>Total</span></a></li>";
    $query = "\tSELECT DISTINCT\t\tclientGroup\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tFROM\t\t\t\tusi_tbl_activequeue";
    $result = mysql_query($query, $conn) or die('Query failed: ' . mysql_error());
    if (mysql_num_rows($result) > 0) {
        while ($rows = mysql_fetch_array($result, MYSQL_NUM)) {
Ejemplo n.º 17
0
 function run($dbi, $argstr, &$request, $basepage)
 {
     global $WikiTheme;
     $args = $this->getArgs($argstr, $request);
     extract($args);
     if ($request->getArg('action') != 'browse') {
         return $this->disabled("(action != 'browse')");
     }
     if (!$request->isGetOrHead()) {
         return $this->disabled("(method != 'GET')");
     }
     if (!$src and $page) {
         if ($page == $request->get('pagename')) {
             return $this->error(sprintf(_("recursive inclusion of page %s"), $page));
         }
         $src = WikiURL($page);
     }
     if (!$src) {
         return $this->error(sprintf(_("%s or %s parameter missing"), 'src', 'page'));
     }
     // FIXME: How to normalize url's to compare against recursion?
     if ($src == $request->getURLtoSelf()) {
         return $this->error(sprintf(_("recursive inclusion of url %s"), $src));
     }
     static $noframes = false;
     if ($noframes) {
         // Content for noframes version of page.
         return HTML::p(fmt("See %s", HTML::a(array('href' => $src), $src)));
     }
     $noframes = true;
     if ($which = $request->getArg('frame')) {
         // Generate specialized frame output (header, footer, etc...)
         $request->discardOutput();
         displayPage($request, new Template("frame-{$which}", $request));
         $request->finish();
         //noreturn
     }
     // Generate the outer frameset
     $frame = HTML::frame(array('name' => $name, 'src' => $src, 'title' => $title, 'frameborder' => (int) $frameborder, 'scrolling' => (string) $scrolling, 'noresize' => (bool) $noresize));
     if ($marginwidth) {
         $frame->setArg('marginwidth', $marginwidth);
     }
     if ($marginheight) {
         $frame->setArg('marginheight', $marginheight);
     }
     $tokens = array('CONTENT_FRAME' => $frame, 'ROWS' => $rows, 'COLS' => $cols, 'FRAMEARGS' => sprintf('frameborder="%d"', $frameborder));
     // Produce the frameset.
     $request->discardOutput();
     displayPage($request, new Template('frameset', $request, $tokens));
     $request->finish();
     //noreturn
 }
        $aAdvertiser['reportdeactivate'] = 'f';
        $aAdvertiser['report'] = 'f';
        $aAdvertiser['reportinterval'] = 7;
    }
}
/*-------------------------------------------------------*/
/* MAIN REQUEST PROCESSING                               */
/*-------------------------------------------------------*/
//build advertiser form
$advertiserForm = buildAdvertiserForm($aAdvertiser);
if ($advertiserForm->validate()) {
    //process submitted values
    processForm($aAdvertiser, $advertiserForm);
} else {
    //either validation failed or form was not submitted, display the form
    displayPage($aAdvertiser, $advertiserForm);
}
/*-------------------------------------------------------*/
/* Build form                                            */
/*-------------------------------------------------------*/
function buildAdvertiserForm($aAdvertiser)
{
    $form = new OA_Admin_UI_Component_Form("clientform", "POST", $_SERVER['SCRIPT_NAME']);
    $form->forceClientValidation(true);
    $form->addElement('hidden', 'clientid', $aAdvertiser['clientid']);
    $form->addElement('header', 'header_basic', $GLOBALS['strBasicInformation']);
    $nameElem = $form->createElement('text', 'clientname', $GLOBALS['strName']);
    if (!OA_Permission::isAccount(OA_ACCOUNT_MANAGER)) {
        $nameElem->freeze();
    }
    $form->addElement($nameElem);
Ejemplo n.º 19
0
 function savePage()
 {
     $request =& $this->request;
     if ($this->isUnchanged()) {
         // Allow admin lock/unlock even if
         // no text changes were made.
         if ($this->updateLock()) {
             $dbi = $request->getDbh();
             $dbi->touch();
         }
         // Save failed. No changes made.
         $this->_redirectToBrowsePage();
         // user will probably not see the rest of this...
         include_once 'lib/display.php';
         // force browse of current version:
         $request->setArg('version', false);
         displayPage($request, 'nochanges');
         return true;
     }
     if (!$this->user->isAdmin() and $this->isSpam()) {
         $this->_isSpam = true;
         return false;
         /*
         // Save failed. No changes made.
         $this->_redirectToBrowsePage();
         // user will probably not see the rest of this...
         include_once('lib/display.php');
         // force browse of current version:
         $request->setArg('version', false);
         displayPage($request, 'nochanges');
         return true;
         */
     }
     $page =& $this->page;
     // Include any meta-data from original page version which
     // has not been explicitly updated.
     // (Except don't propagate pgsrc_version --- moot for now,
     //  because at present it never gets into the db...)
     $meta = $this->selected->getMetaData();
     unset($meta['pgsrc_version']);
     $meta = array_merge($meta, $this->meta);
     // Save new revision
     $this->_content = $this->getContent();
     $newrevision = $page->save($this->_content, $this->version == -1 ? -1 : $this->_currentVersion + 1, $meta);
     if (!isa($newrevision, 'WikiDB_PageRevision')) {
         // Save failed.  (Concurrent updates).
         return false;
     } else {
         // Save succeded. We store cross references (if there are).
         $reference_manager =& ReferenceManager::instance();
         $reference_manager->extractCrossRef($this->_content, $page->getName(), ReferenceManager::REFERENCE_NATURE_WIKIPAGE, GROUP_ID);
         // Save succeded. We raise an event.
         $new = $this->version + 1;
         $difflink = WikiURL($page->getName(), array('action' => 'diff'), true);
         $difflink .= "&versions%5b%5d=" . $this->version . "&versions%5b%5d=" . $new;
         $eM =& EventManager::instance();
         $uM =& UserManager::instance();
         $user =& $uM->getCurrentUser();
         $eM->processEvent("wiki_page_updated", array('group_id' => GROUP_ID, 'wiki_page' => $page->getName(), 'diff_link' => $difflink, 'user' => $user, 'version' => $this->version));
     }
     // New contents successfully saved...
     $this->updateLock();
     // Clean out archived versions of this page.
     include_once 'lib/ArchiveCleaner.php';
     $cleaner = new ArchiveCleaner($GLOBALS['ExpireParams']);
     $cleaner->cleanPageRevisions($page);
     /* generate notification emails done in WikiDB::save to catch 
        all direct calls (admin plugins) */
     // look at the errorstack
     $errors = $GLOBALS['ErrorManager']->_postponed_errors;
     $warnings = $GLOBALS['ErrorManager']->getPostponedErrorsAsHTML();
     $GLOBALS['ErrorManager']->_postponed_errors = $errors;
     $dbi = $request->getDbh();
     $dbi->touch();
     global $WikiTheme;
     if (empty($warnings->_content) && !$WikiTheme->getImageURL('signature')) {
         // Do redirect to browse page if no signature has
         // been defined.  In this case, the user will most
         // likely not see the rest of the HTML we generate
         // (below).
         $this->_redirectToBrowsePage();
     }
     // Force browse of current page version.
     $request->setArg('version', false);
     //$request->setArg('action', false);
     $template = Template('savepage', $this->tokens);
     $template->replace('CONTENT', $newrevision->getTransformedContent());
     if (!empty($warnings->_content)) {
         $template->replace('WARNINGS', $warnings);
     }
     $pagelink = WikiLink($page);
     GeneratePage($template, fmt("Saved: %s", $pagelink), $newrevision);
     return true;
 }
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
displayPage($menu . "<br><br>" . $body);
//*****************************************************************
// Documentations of recommend_listedschool table
/*
ETALAB
Géolocalisation des établissements des premier et second degré 
sous tutelle du ministère de l’éducation nationale
Le fichier (MEN_Etalab.csv) comporte les champs suivants :
numero_uai
numéro de l'unité administrative immatriculée (uai)
etat_etablissement
état de l’établissement  (1 = ouvert ; 2 = à fermer ; 3 = à ouvrir)
lib_nature
libellé de la nature de l'uai
sous_fic
code du sous-fichier (1 = premier degré ; 3 = second degré)
Ejemplo n.º 21
0
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with CodevTT.  If not, see <http://www.gnu.org/licenses/>.
*/
require '../path.inc.php';
require_once 'i18n/i18n.inc.php';
$page_name = T_("Installation finished");
require_once 'install/install_header.inc.php';
Config::getInstance()->setQuiet(true);
require_once 'install/install_menu.inc.php';
#$logger = Logger::getLogger("install_step4");
function displayPage()
{
    // relative path ("./" or "../")
    // absolute path is preferable for IE/W3C compatibility
    $rootWebSite = is_null(Constants::$codevURL) ? '../' : Constants::$codevURL;
    if ('/' !== substr($rootWebSite, -1)) {
        $rootWebSite .= '/';
    }
    echo "<div style='margin-top:6em;'>\n\n   <h1 class='center'>Congratulations !</h1>\n   <div class='center'>CodevTT is now installed.</div>\n\n   <div class='left'  style='margin-top:6em;'>\n      <h2>What's next ?</h2>\n\n      <ul>\n         <li><a href='" . $rootWebSite . "index.php' title='CodevTT & Mantis share the same users' target='_blank't>login !</a></li>\n         <li>Go to the <a href='" . $rootWebSite . "admin/create_team.php' target='_blank't>create team</a> page and create your team</li>\n         <li>In the <a href='" . $rootWebSite . "admin/edit_team.php' target='_blank't>edit team</a> page, add members & projects to your team</li>\n      </ul>\n       <span class='help_font'>Note: CodevTT & Mantis share the same users / passwords</span>\n\n   </div>\n\n   <div class='left'  style='margin-top:3em;'>\n      <strong>Troubleshooting</strong>\n      <ul>\n         <li>Check the <a href='http://codevtt.org/site/?forum=installation' target='_blank't>Installation forum</a></li>\n         <li>Read the <a href='http://codevtt.org/site/?page_id=153' target='_blank't>Documentation</a></li>\n      </ul>\n   </div>\n\n</div>";
}
function displayFooter()
{
    echo "<br/><hr />\n         <address class='right'>\n            <a href='http://www.gnu.org/licenses/gpl.html' target='_blank'><img title='GPL v3' src='../images/copyleft.png' /></a>\n            2010-" . date('Y') . "&nbsp; <span title='Freedom is nothing else but a chance to be better. (Albert Camus)'><a href='http://codevtt.org' target='_blank'>CodevTT.org</a></span><br>\n         </address>";
}
// =========== MAIN ==========
displayPage();
displayFooter();
Ejemplo n.º 22
0
//var_dump($campaign);
$oComponent = null;
if (isset($GLOBALS['_MAX']['CONF']['plugins']['openXThorium']) && $GLOBALS['_MAX']['CONF']['plugins']['openXThorium']) {
    $oComponent =& OX_Component::factory('admin', 'oxThorium', 'oxThorium');
}
$campaignForm = buildCampaignForm($campaign, $oComponent);
if ($campaignForm->isSubmitted() && $campaignForm->validate()) {
    //process submitted values
    $errors = processCampaignForm($campaignForm, $oComponent);
    if (!empty($errors)) {
        //need to redisplay page with general errors
        displayPage($campaign, $campaignForm, $statusForm, $errors);
    }
} else {
    //either validation failed or no form was not submitted, display the page
    displayPage($campaign, $campaignForm, $statusForm);
}
/*-------------------------------------------------------*/
/* Build form                                            */
/*-------------------------------------------------------*/
function buildCampaignForm($campaign, &$oComponent = null)
{
    global $pref;
    $form = new OA_Admin_UI_Component_Form("campaignform", "POST", $_SERVER['SCRIPT_NAME']);
    $form->forceClientValidation(true);
    $form->addElement('hidden', 'campaignid', $campaign['campaignid']);
    $form->addElement('hidden', 'clientid', $campaign['clientid']);
    $form->addElement('hidden', 'expire_time', $campaign['expire_time']);
    $form->addElement('hidden', 'target_old', isset($campaign['target_value']) ? (int) $campaign['target_value'] : 0);
    $form->addElement('hidden', 'target_type_old', isset($campaign['target_type']) ? $campaign['target_type'] : '');
    $form->addElement('hidden', 'weight_old', isset($campaign['weight']) ? (int) $campaign['weight'] : 0);
Ejemplo n.º 23
0
 function action_browse()
 {
     $this->buffer_output();
     include_once "lib/display.php";
     displayPage($this);
 }
Ejemplo n.º 24
0
    displayPage($sideBar, '<div id="box1">
				<h2 id="sName">Team Member Issues - Select a name</h2>
						<div id="grid" style="display: none;">
							<script>
		 						$(document).ready(function () {		
		 																																																						            	 
			                        var dataSource = new kendo.data.DataSource({
			                            transport: {
			                                read:  {
			                                    url: "",
			                                    dataType: "json"
			                                },
			                                update: {
			                                    url: "",
			                                    dataType: "json"	                                   
			                                },
			                                destroy: {
			                                    url: "",
			                                    dataType: "json"
			                                },
			                                create: {
			                                    url: "",
			                                    dataType: "json"	                                         									        								    									
			                                },
			                                parameterMap: function(options, operation) {
			                                    if (operation !== "read" && options.models) {
			                                        return {models: kendo.stringify(options.models)};
			                                    }
			                                }
			                            },
			                            batch: true,
			                            pageSize: 10,	                            	                            
			                            schema: {
			                                model: {
			                                    id: "uniqueID",
			                                    fields: {
			                                    	uniqueID: { editable: false, nullable: true },
			                                        memID: { editable: false, nullable: true },
			                                        name: { editable: true, validation: { required: true } },	                                        
			                                        dateOfIncident: { editable: true, type: "date" },
			                                        managerName: { editable: true },
			                                        issue: { editable: true, validation: { required: true } },
			                                        email: {editable: true}
			                                    }
			                                }
			                            }
			                            
			                        });		                    												

				                    $("#grid").kendoGrid({
				                    	autoBind: false,
				                        dataSource: dataSource,
				                        sortable: true,
				                        resizable: true,
				                        pageable: true,
				                        height: 500,		                        
				                        toolbar: ["create"],				                       				                       
				                        columns: [				                            
				                            { field: "name", title: "Employee Name", width: "120px", filterable: true },
				                            { field: "dateOfIncident", title: "Date", format: "{0:MM/dd/yyyy}", width: "110px", filterable: false },
				                            { field: "managerName", title: "Manager Name", width: "150px", filterable: false },
				                            { field: "issue", title: "Issue", width: "250px", editor: textareaEditor, filterable: true },
				                            { field: "email", title: "Email Out?", hidden: true, editor: "<input type=\'checkbox\' name=\'emailOut\' value=\'0\' />" },		                            
				                            { command: ["edit", "destroy"], title: "&nbsp;" }],
				                        editable: "popup"
				                    });									

		   							$(".issueName").click(function () {
		   								$("#grid").show();
		   								$("#sName").html("Team Member Issues - " + $(this).html());
		   								var grid = $("#grid").data("kendoGrid");
										grid.dataSource.transport.options.read.url = "/modules/getIssues.php?id=" + $(this).attr("value") + "&q=1";
										grid.dataSource.transport.options.update.url = "/modules/getIssues.php?id=" + $(this).attr("value") + "&q=2"; 
										grid.dataSource.transport.options.destroy.url = "/modules/getIssues.php?id=" + $(this).attr("value") + "&q=3"; 
										grid.dataSource.transport.options.create.url = "/modules/getIssues.php?id=" + $(this).attr("value") + "&q=4"; 
										dataSource.read();	
												        					    						
									});	
										
				                    function textareaEditor(container, options) {
											    	$("<textarea data-bind=\\"value: " + options.field + "\\" cols=\\"19\\" rows=\\"4\\"></textarea>")
			        								.appendTo(container);
									}
								});
						</script>
					</div>
					</div>');
Ejemplo n.º 25
0
$content->assign('report_description', $reportQuery->fields['report_description']);
if ($screenshot) {
    $content->assign('screenshot', $screenshot);
}
// Navigation Functionality
$nav_continuity_params = $query->continuityParams(array('report_id'));
$content->assign('nav_continuity_params', $nav_continuity_params);
if (isset($_SESSION['reportList'])) {
    $reportIndex = array_search($_GET['report_id'], $_SESSION['reportList']);
    $content->assign('index', $reportIndex);
    $content->assign('total', sizeOf($_SESSION['reportList']));
    $content->assign('showReportNavigation', true);
    if ($reportIndex > 0) {
        $content->assign('first_report', $_SESSION['reportList'][0]);
        $content->assign('previous_report', $_SESSION['reportList'][$reportIndex - 1]);
    } else {
        $content->assign('first_report', 'disable');
        $content->assign('previous_report', 'disable');
    }
    if ($reportIndex < sizeof($_SESSION['reportList']) - 1) {
        $content->assign('next_report', $_SESSION['reportList'][$reportIndex + 1]);
        $content->assign('last_report', $_SESSION['reportList'][sizeof($_SESSION['reportList']) - 1]);
    } else {
        $content->assign('next_report', 'disable');
        $content->assign('last_report', 'disable');
    }
} else {
    $content->assign('showReportNavigation', false);
}
displayPage($content, 'report', 'report.tpl', $title);
Ejemplo n.º 26
0
    /* Store preferences									 */
    /*-------------------------------------------------------*/
    $session['prefs']['inventory_entities'][OA_Permission::getEntityId()]['affiliateid'] = $affiliateid;
    phpAds_SessionDataStore();
}
/*-------------------------------------------------------*/
/* MAIN REQUEST PROCESSING                               */
/*-------------------------------------------------------*/
//build form
$channelForm = buildChannelForm($channel);
if ($channelForm->validate()) {
    //process submitted values
    processForm($channelForm);
} else {
    //either validation failed or form was not submitted, display the form
    displayPage($channel, $channelForm);
}
/*-------------------------------------------------------*/
/* Build form                                            */
/*-------------------------------------------------------*/
function buildChannelForm($channel)
{
    $form = new OA_Admin_UI_Component_Form("channelform", "POST", $_SERVER['PHP_SELF']);
    $form->forceClientValidation(true);
    $form->addElement('hidden', 'agencyid', OA_Permission::getAgencyId());
    $form->addElement('hidden', 'affiliateid', $channel['affiliateid']);
    $form->addElement('hidden', 'channelid', $channel['channelid']);
    $form->addElement('header', 'header_basic', $GLOBALS['strBasicInformation']);
    $form->addElement('text', 'name', $GLOBALS['strName']);
    $form->addElement('text', 'description', $GLOBALS['strDescription']);
    $form->addElement('textarea', 'comments', $GLOBALS['strComments']);
Ejemplo n.º 27
0
//  check if Thorium plugin is enabled
$oComponent = null;
if (isset($GLOBALS['_MAX']['CONF']['plugins']['openXThorium']) && $GLOBALS['_MAX']['CONF']['plugins']['openXThorium']) {
    $oComponent =& OX_Component::factory('admin', 'oxThorium', 'oxThorium');
}
//build form
$websiteForm = buildWebsiteForm($affiliate);
if ($websiteForm->validate()) {
    //process submitted values
    $oPublisherDll = processForm($affiliateid, $websiteForm, $oComponent);
    if ($oPublisherDll->_errorMessage || $oPublisherDll->_noticeMessage) {
        displayPage($affiliateid, $websiteForm, $oPublisherDll);
    }
} else {
    //either validation failed or form was not submitted, display the form
    displayPage($affiliateid, $websiteForm);
}
/*-------------------------------------------------------*/
/* Build form                                            */
/*-------------------------------------------------------*/
function buildWebsiteForm($affiliate)
{
    $form = new OA_Admin_UI_Component_Form("affiliateform", "POST", $_SERVER['SCRIPT_NAME']);
    $form->forceClientValidation(true);
    $form->addElement('hidden', 'affiliateid', $affiliate['affiliateid']);
    $form->addElement('header', 'basic_info', $GLOBALS['strBasicInformation']);
    $form->addElement('text', 'website', $GLOBALS['strWebsiteURL']);
    $form->addElement('text', 'name', $GLOBALS['strName']);
    $form->addElement('text', 'contact', $GLOBALS['strContact']);
    $form->addElement('text', 'email', $GLOBALS['strEMail']);
    $form->addElement('controls', 'form-controls');
Ejemplo n.º 28
0
$here = dirname(__FILE__);
define("HOME_DIR", "{$here}/");
// Add Home directory and PHP directory to the include path
$current_path = ini_get("include_path");
if (!defined("PATH_SEPARATOR")) {
    if (strpos($_ENV["OS"], "Win") !== false) {
        define("PATH_SEPARATOR", ";");
    } else {
        define("PATH_SEPARATOR", ":");
    }
}
ini_set("include_path", $current_path . PATH_SEPARATOR . $here . PATH_SEPARATOR . $here . DIRECTORY_SEPARATOR . "php");
// Set NUNIT_PATH using the url for this page.
/*if ( isset( $_SERVER[ "PHP_SELF" ] ) )
    define( "NUNIT_PATH", dirname( $_SERVER[ "PHP_SELF" ] ) . '/' );
  else
    define( "NUNIT_PATH", '/' );*/
// Include required routines
require_once "display_page.php";
require_once "html_funcs.php";
// Get any arguments passed
$name = getarg("p", "home");
$rel = getarg("r", "");
$NUnitRelease = $rel;
$html_dirs = array($here);
if ($rel != "") {
    array_push($html_dirs, "{$here}/docs/{$rel}");
}
// Display the requested page
displayPage($name, $html_dirs);
Ejemplo n.º 29
0
if (ereg("^zone:([0-9]+)\$", $aZone['chain'], $regs)) {
    $aZone['chainzone'] = $regs[1];
} else {
    $aZone['chainzone'] = '';
}
/*-------------------------------------------------------*/
/* MAIN REQUEST PROCESSING                               */
/*-------------------------------------------------------*/
//build zone adv form
$zoneForm = buildZoneForm($aZone, $oComponent);
if ($zoneForm->validate()) {
    //process submitted values
    processForm($aZone, $zoneForm, $oComponent);
} else {
    //either validation failed or form was not submitted, display the form
    displayPage($aZone, $zoneForm);
}
/*-------------------------------------------------------*/
/* Build form                                            */
/*-------------------------------------------------------*/
function buildZoneForm($aZone, $oComponent = null)
{
    $form = new OA_Admin_UI_Component_Form("zoneform", "POST", $_SERVER['SCRIPT_NAME']);
    $form->forceClientValidation(true);
    $form->addElement('hidden', 'zoneid', $aZone['zoneid']);
    $form->addElement('hidden', 'affiliateid', $aZone['affiliateid']);
    buildChainSettingsFormSection($form, $aZone);
    if ($oComponent && method_exists($oComponent, 'extendZoneAdvancedForm')) {
        $oComponent->extendZoneAdvancedForm($form, $aZone);
    }
    buildDeliveryCappingFormSection($form, $GLOBALS['strCappingZone'], $aZone);
Ejemplo n.º 30
-2
    $zone['comments'] = null;
}
$zone['affiliateid'] = $affiliateid;
/*-------------------------------------------------------*/
/* MAIN REQUEST PROCESSING                               */
/*-------------------------------------------------------*/
//build form
$zoneForm = buildZoneForm($zone);
if ($zoneForm->validate()) {
    //process submitted values
    $errors = processForm($zoneForm);
    if (!empty($errors)) {
    }
}
//display the page - show any validation errors that may have occured
displayPage($zone, $zoneForm, $errors);
/*-------------------------------------------------------*/
/* Build form                                            */
/*-------------------------------------------------------*/
function buildZoneForm($zone)
{
    global $conf;
    // Initialise Ad  Networks
    $oAdNetworks = new OA_Central_AdNetworks();
    $form = new OA_Admin_UI_Component_Form("zoneform", "POST", $_SERVER['PHP_SELF']);
    $form->forceClientValidation(true);
    $form->addElement('hidden', 'zoneid', $zone['zoneid']);
    $form->addElement('hidden', 'affiliateid', $zone['affiliateid']);
    $form->addElement('header', 'zone_basic_info', $GLOBALS['strBasicInformation']);
    $form->addElement('text', 'zonename', $GLOBALS['strName']);
    $form->addElement('text', 'description', $GLOBALS['strDescription']);