<?php require 'newsletter.inc.php'; if ($_GET["array"] == "") { $json = "{ " . JsonFromQuery($con, stripslashes($_GET["object"]), false, false) . " }"; } else { $json = "[ " . JsonFromQuery($con, stripslashes($_GET["array"]), false, true) . " ]"; } header("Content-type: application/json"); header("Content-length: " . strlen($json)); echo $json;
</style> <script type="text/javascript" src="/mambots/editors/tinymce3.0.3/jscripts/tiny_mce/tiny_mce.js"></script> </head> <body onload=Load()> <script> <?php ProcessFields($con); $date = $_POST["date"]; if (!$con->query("UPDATE ctcweb9_newsletter.fields SET `order` = id WHERE `order` < 0")) { die($con->error); } $table = 'ctcweb9_newsletter.fields'; $tableroot = 'ctcweb9_newsletter.fieldsGrouped'; $groupcols = JsonFromQuery($con, "SHOW FULL COLUMNS FROM {$table} LIKE 'id'") . ',' . JsonFromQuery($con, "SHOW FULL COLUMNS FROM {$table} LIKE 'type'"); $grouprows = JsonFromQuery($con, "SELECT min(id) id, `type` " . "FROM {$table} GROUP BY `type`"); $cols = JsonFromQuery($con, "SHOW FULL COLUMNS FROM {$table}"); $positions = "SELECT DISTINCT con_position name FROM ctcweb9_joom1.jos_contact_details"; $columns = "SELECT DISTINCT `column` name FROM {$table}"; $types = "SELECT DISTINCT `type` name FROM {$table}"; ?> </script> <form name="newsletterform" method="post" onsubmit="return false"> <?php require 'tabs.inc.php'; ?> <div> <?php require 'buttons.inc.php'; ?> <span id=status></span> </div>
<title>CTC Newsletter - Newsletter Dates</title> <link rel="shortcut icon" href="icon.gif" /> <style> <?php require 'editor.css'; ?> #newsletterstab { border: solid 2px black; border-bottom: solid 2px white; background: none;} </style> <script type="text/javascript" src="/mambots/editors/tinymce3.0.3/jscripts/tiny_mce/tiny_mce.js"></script> </head> <body onload=Load()> <script> <?php $table = 'ctcweb9_newsletter.newsletters'; $cols = JsonFromQuery($con, "SHOW FULL COLUMNS FROM {$table}"); $rows = JsonFromQuery($con, "SELECT * FROM {$table}"); ?> </script> <form name="newsletterform" method="post" onsubmit="return false"> <?php require 'tabs.inc.php'; ?> <div> <?php require 'buttons.inc.php'; ?> <span id=status></span> </div> <div id="postdata"></div> </form>
<?php echo ArrayToOptions($dates, $_POST['date'], "Current"); ?> </select> <span id="status"></span> </div> <div id="postdata"></div> </form> <div id="node_<?php echo $table; ?> "></div> <div id="menu"></div> <script> <?php echo "\n\t\t\t\t\tvar images = { data: {" . JsonFromQuery($con, $images) . "} };\n\t\t var root = {table: \t '{$table}',\n\t\t cols: { {$cols} },\n\t\t rows: { {$rows} },\n\t\t\t\t\t\t\t\t prefs:\t [ {$prefs} ],\n\t\t defaults: { date: '{$current['date']}' },\n\t\t sortdefault: 'order',\n\t\t\t\t\t\t\t\t settings:\t { {$settings} },\n\t\t source: { reportid: { data: {" . JsonFromQuery($con, $ids) . "} },\n\t\t\t\t\t\t\t\t\t\t\t\timage1: images,\n\t\t\t\t\t\t\t\t\t\t\t\timage2: images,\n\t\t\t\t\t\t\t\t\t\t\t\timage3: images,\n\t\t\t\t\t\t\t\t\t\t\t\timage4: images,\n\t\t\t\t\t\t\t\t\t\t\t\timage5: images,\n\t\t\t\t\t\t\t\t\t\t\t\timage6: images}};\n\t\t "; require 'object.js'; require 'table.js'; require 'editor.js'; ?> </script> <script> root.custom = {id: {head: false}, order: {ro: true, head: true}, date: {head: true}, reportid: {head: true}, reportlink: {ro: true, head: true, Make: MakeReportLink},
"/> <span id="status"></span> </div> <div id="postdata"></div> </form> <div id="node_<?php echo $tableroot; ?> "></div> <div id="menu"></div> <script> <?php $groupcols = JsonFromQuery($con, "SHOW FULL COLUMNS FROM {$table} LIKE 'id'") . ',' . JsonFromQuery($con, "SHOW FULL COLUMNS FROM {$table} LIKE 'section'"); $grouprows = JsonFromQuery($con, "SELECT min(id) id, section, SUM({$searchexpr}) found " . "FROM {$table} WHERE {$sectionexpr} GROUP BY section"); $cols = JsonFromQuery($con, "SHOW FULL COLUMNS FROM {$table}"); $settings = JsonFromQuery($con, "SELECT name, value FROM ctcweb9_newsletter.fields WHERE `type` = 'setting'"); $types = "SELECT DISTINCT type name FROM {$table}"; $sections = "SELECT DISTINCT section name FROM {$table}"; $documents = "SELECT name FROM ctcweb9_newsletter.documents"; echo "\n\t\t\t\tvar root = \t{table: \t'{$tableroot}',\n\t cols: \t{ {$groupcols} },\n\t rows: \t{ {$grouprows} },\n\t\t\t\t\t\t\t prefs:\t\t\t[ {$prefs} ],\n\t\t\t\t\t\t\t settings:\t \t{ {$settings} },\n\t\t\t\t\t\t\t ro:\t\t\ttrue,\n\t\t\t\t\t\t\t rowopen:\t\ttrue,\n\t\t\t\t\t\t\t custom:\t\t{ section: {head: true }}};\n\t var child = {table: \t'{$table}',\n\t cols: \t{ {$cols} },\n\t defaults: \t{ date: '{$current['date']}' },\n\t\t\t\t\t\t\t columns:\t\t\"*,{$searchexpr} found\",\n\t\t\t\t\t\t\t where:\t\t\t\"{$dateexpr} or {$searchexpr}\",\n\t\t\t\t\t\t\t linkcolumn:\t'section',\n\t source: \t{\ttype: \t\t{ query: \"{$types}\" },\n\t\t\t\t\t\t\t\t\t\t\t\tsection: \t\t{ query: \"{$sections}\" },\n\t\t\t\t\t\t\t\t\t\t\t\tincludedocument:{ query: \"{$documents}\" }},\n\t custom: \t{ \torder: \t {ro:true,sortorder:-1},\n\t\t\t\t\t\t\t\t\t\t\t\tsection:\t {head:true},\n\t\t\t\t\t\t\t\t\t\t\t\ttype: \t {head:true},\n\t\t\t\t\t\t\t\t\t\t\t\ttitle: \t {head:true},\n\t\t\t\t\t\t\t\t\t\t\t\tdate: \t {head:true},\n\t\t\t\t\t\t\t\t\t\t\t\ttext:\t\t {Show:\tShowText,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\theight: 200, \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tWysiwyg: WysiwygFunction},\n\t\t\t\t\t\t\t\t\t\t\t\tincludepreview:{Show:\tShowIncludePreview,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tro:\t\ttrue,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tMake: MakeIncludePreview},\n\t\t\t\t\t\t\t\t\t\t\t\tincludedocument:{Show:\tShowIncludePreview}}};\n\t\t\t\troot.children = [child];\n\t "; require 'object.js'; require 'table.js'; require 'editor.js'; ?> function ShowText(data) { return data.type.toLowerCase().indexOf("include") != 0 ; } function ShowIncludePreview(data) { return data.type.toLowerCase().indexOf("include") == 0;
<?php require 'newsletter.inc.php'; if (count($processor->userpositions) == 0) { echo "<script>window.location.replace('" . BASE_URL . "');</script>"; die('Not logged on'); } $prefs = "{ value:'GenerateFile(\"{$_POST['generatefile']}\")'}," . JsonFromQuery($con, "SELECT value from ctcweb9_newsletter.fields \n\t\t\t\t\t\t\t\t\t\tWHERE `name`='{$username}.{$_SERVER['REQUEST_URI']}'", false, true);
<link rel="shortcut icon" href="icon.gif" /> <style> <?php require 'editor.css'; ?> #documentstab { border: solid 2px black; border-bottom: solid 2px white; background: none;} </style> <script type="text/javascript" src="/mambots/editors/tinymce3.0.3/jscripts/tiny_mce/tiny_mce.js"></script> </head> <body onload="Load()"> <script> <?php $table = "ctcweb9_newsletter.documents"; $settings = JsonFromQuery($con, "SELECT name, value FROM ctcweb9_newsletter.fields WHERE `type` = 'setting'"); $cols = JsonFromQuery($con, "SHOW FULL COLUMNS FROM {$table}"); $rows = JsonFromQuery($con, "SELECT id, name, size, uploaded,\n\t\t\t\t\t\t\t\t\t\tconcat('<a href=generate.php?name=', name, '>download</a> ',\n\t\t\t\t\t\t\t\t\t\tif (name like '%.rtf' or name like '%.xml' or name like '%.odt',\n\t\t\t\t\t\t\t\t\t\tconcat('<a href=generate.php?expand=', name, '>generate</a>'),'')) data\n\t\t\t\t\t\t\t\t\t\tFROM {$table}"); ?> </script> <form name="newsletterform" method="post" onsubmit="return false" enctype="multipart/form-data"> <?php require 'tabs.inc.php'; ?> <div> <?php require 'buttons.inc.php'; ?> <span id="status"></span> <b>Upload File:</b> <input type="hidden" name="MAX_FILE_SIZE" value="4000000" /> <input type="file" id="upload" name="upload" onchange="UploadChange()"/> <span id="uploadwarning" class="qc"></span>
} if ($filterids != "" && $filterdate == "") { $filterdate = "All"; } if ($filterlimit == "" || $filterlimit == "0") { $filterlimit = "1000"; } if ($filterdate == "Current" || $filterdate == "") { $where .= " AND `datetime` >= '{$startdate}'"; } else { if ($filterdate != "All") { $where .= " AND date_format(`datetime`,'%Y-%m') like '{$filterdate}%'"; } } $tablerows = JsonFromQuery($con, "SELECT * FROM {$table} WHERE {$where} \n\t\t\t\t\t\t\t\t\t\t ORDER BY itemid desc LIMIT 0, {$filterlimit}"); $tables = JsonFromQuery($con, "SELECT distinct `table` FROM {$table} WHERE {$where} \n\t\t\t\t\t\t\t\t\t\t ORDER BY itemid desc LIMIT 0, {$filterlimit}"); ?> </script> <form name="newsletterform" method="post" onsubmit="return false"> <?php require 'tabs.inc.php'; ?> <div> <?php require 'buttons.inc.php'; ?> <b>Date:</b> <select name="filterdate" onchange="Save()"> <?php echo ArrayToOptions($filterdates, $filterdate, "Current"); ?>
"/> <span id="status"></span> </div> <div id="postdata"><input type="hidden" name="random" value="<?php echo date('Ymd_His'); ?> "></div> </form> <div id="node_<?php echo $table; ?> "></div> <div id="menu"></div> <script> <?php echo "\n var maps = {data:{" . JsonFromQuery($con, $maps) . "}};\n var root = {table: '{$table}',\n cols: { {$cols} },\n rows: { {$rows} },\n prefs: [ {$prefs} ],\n defaults: { date: '{$current['date']}' {$defaults} },\n sortdefault: 'date',\n source: {leader: \t{ data: {" . JsonFromQuery($con, $leaders) . "} },\n grade: \t{ data: {" . JsonFromQuery($con, $grades) . "} },\n cost: \t{ data: {" . JsonFromQuery($con, $costs) . "} },\n departurepoint: { data: {" . JsonFromQuery($con, $departurepoints) . "} },\n 'type': \t{ data: {" . JsonFromQuery($con, $eventtypes) . "} },\n triplength: \t{ data: {" . JsonFromQuery($con, $triplengths) . "} },\n map1: \tmaps,\n map2: \tmaps,\n map3: \tmaps},\n issuedate: '{$issuedate}'};\n "; require 'object.js'; require 'table.js'; require 'editor.js'; ?> root.custom = { date: {head: true}, triplength: {Show: ShowOnTripOnly}, datedisplay: {ro: true, Make: MakeDateDisplay}, leader: {Show: ShowOnTripOnly, head: root.type != "Social Events"}, leaderphone: {Show: ShowOnTripOnly, ro: true, Make: MakeLeaderPhone}, leaderplus: {Show: ShowOnTripOnly}, leaderemail: {Show: ShowOnTripOnly,