App->content (content manager), added preliminary support for translations.

This commit is contained in:
James Rose 2012-11-24 19:37:34 +00:00
parent 17abb63a17
commit fede87f757
17 changed files with 259 additions and 80 deletions

View File

@ -0,0 +1,68 @@
<?php
/*
FusionPBX
Version: MPL 1.1
The contents of this file are subject to the Mozilla Public License Version
1.1 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.mozilla.org/MPL/
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.
The Original Code is FusionPBX
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2008-2012
the Initial Developer. All Rights Reserved.
Contributor(s):
Mark J Crane <markjcrane@fusionpbx.com>
James Rose <james.o.rose@gmail.com>
*/
$text['title-rss']['en-us'] = 'RSS Feed';
$text['description-rss']['en-us'] = 'Task List for RSS...';
$text['message-add']['en-us'] = 'Add Complete';
$text['button-back']['en-us'] = 'Back';
$text['button-public']['en-us'] = 'public';
$text['label-order']['en-us'] = 'Order';
$text['label-content']['en-us'] = 'Content';
$text['button-add-title']['en-us'] = 'Add';
$text['message-delete-done']['en-us'] = 'Delete Completed';
$text['label-list']['en-us'] = 'List';
$text['label-title']['en-us'] = 'Title';
$text['label-link']['en-us'] = 'Link';
$text['label-group']['en-us'] = 'Group';
$text['label-order']['en-us'] = 'Order';
$text['label-edit']['en-us'] = 'Edit';
$text['message-confirm-delete']['en-us'] = 'Do you really want to delete this?';
$text['message-item-down']['en-us'] = 'Item Moved Down';
$text['message-item-up']['en-us'] = 'Item Moved Up';
$text['label-search']['en-us'] = 'Search Results';
$text['label-id']['en-us'] = 'ID';
$text['label-category']['en-us'] = 'Category';
$text['label-sub-category']['en-us'] = 'Sub Category';
$text['label-description']['en-us'] = 'Description';
$text['button-search']['en-us'] = 'Search';
$text['label-rss-category']['en-us'] = 'RSS Category';
$text['button-update']['en-us'] = 'Update';
$text['message-update']['en-us'] = 'Update Complete';
$text['label-details']['en-us'] = 'Details';
$text['label-template']['en-us'] = 'Template';
$text['button-delete']['en-us'] = 'Delete';
$text['label-sub-id']['en-us'] = 'Sub ID';
$text['label-sub-title']['en-us'] = 'Sub Title';
$text['label-sub-link']['en-us'] = 'Sub Link';
$text['label-sub-desc']['en-us'] = 'Sub Description';
$text['message-error-missing']['en-us'] = 'Error missing';
$text['message-description']['en-us'] = 'Please provide a description.';
$text['label-content-edit']['en-us'] = 'Content Edit';
$text['label-type']['en-us'] = 'Type';
$text['label-on-off']['en-us'] = 'on/off';
$text['button-save']['en-us'] = 'Save';
?>

View File

@ -22,6 +22,7 @@
Contributor(s): Contributor(s):
Mark J Crane <markjcrane@fusionpbx.com> Mark J Crane <markjcrane@fusionpbx.com>
James Rose <james.o.rose@gmail.com>
*/ */
return; //disable return; //disable
include "root.php"; include "root.php";
@ -36,6 +37,12 @@ else {
exit; exit;
} }
//add multi-lingual support
require_once "app_languages.php";
foreach($text as $key => $value) {
$text[$key] = $value[$_SESSION['domain']['language']['code']];
}
//include module specific information //include module specific information
if (strlen($mod_config_path)==0) { if (strlen($mod_config_path)==0) {
include "config.php"; include "config.php";
@ -71,9 +78,9 @@ if ($content_type == "rss") {
echo "<rss version=\"2.0\">\n"; echo "<rss version=\"2.0\">\n";
echo "<channel>\n"; echo "<channel>\n";
echo "<title>$module_title RSS Feed</title>\n"; echo "<title>$module_title ".$text['title-rss']."</title>\n";
//echo "<link>http://www.xul.fr/</link>\n"; //echo "<link>http://www.xul.fr/</link>\n";
echo "<description>Task List for RSS...</description>\n"; echo "<description>".$text['description-rss']."</description>\n";
echo "<language>en-US</language>\n"; echo "<language>en-US</language>\n";
//echo "<copyright></copyright>\n"; //echo "<copyright></copyright>\n";
//echo "<image>\n"; //echo "<image>\n";

View File

@ -22,6 +22,7 @@
Contributor(s): Contributor(s):
Mark J Crane <markjcrane@fusionpbx.com> Mark J Crane <markjcrane@fusionpbx.com>
James Rose <james.o.rose@gmail.com>
*/ */
include "root.php"; include "root.php";
require_once "includes/require.php"; require_once "includes/require.php";
@ -35,6 +36,12 @@ else {
exit; exit;
} }
//add multi-lingual support
require_once "app_languages.php";
foreach($text as $key => $value) {
$text[$key] = $value[$_SESSION['domain']['language']['code']];
}
if (count($_POST)>0) { if (count($_POST)>0) {
//get the http values and set them as variables //get the http values and set them as variables
@ -99,7 +106,7 @@ if (count($_POST)>0) {
require_once "includes/header.php"; require_once "includes/header.php";
echo "<meta http-equiv=\"refresh\" content=\"2;url=rsslist.php\">\n"; echo "<meta http-equiv=\"refresh\" content=\"2;url=rsslist.php\">\n";
echo "<div align='center'>"; echo "<div align='center'>";
echo "Add Complete"; echo $text['message-add'];
echo "</div>"; echo "</div>";
require_once "includes/footer.php"; require_once "includes/footer.php";
return; return;
@ -142,7 +149,7 @@ if (count($_POST)>0) {
echo "<tr>\n"; echo "<tr>\n";
echo "<td width='30%' nowrap valign='top'><b>Content Add</b></td>\n"; echo "<td width='30%' nowrap valign='top'><b>Content Add</b></td>\n";
echo "<td width='70%' align='right' valign='top'><input type='button' class='btn' name='' alt='back' onclick=\"window.location='rsslist.php'\" value='Back'><br /><br /></td>\n"; echo "<td width='70%' align='right' valign='top'><input type='button' class='btn' name='' alt='back' onclick=\"window.location='rsslist.php'\" value='".$text['button-back']."'><br /><br /></td>\n";
echo "</tr>\n"; echo "</tr>\n";
//echo " <tr>"; //echo " <tr>";
//echo " <td class='vncellreq'>Category:</td>"; //echo " <td class='vncellreq'>Category:</td>";
@ -173,7 +180,7 @@ if (count($_POST)>0) {
$prep_statement->execute(); $prep_statement->execute();
echo "<select name=\"rss_group\" class='formfld'>\n"; echo "<select name=\"rss_group\" class='formfld'>\n";
echo "<option value=\"\">public</option>\n"; echo "<option value=\"\">".$text['button-public']."</option>\n";
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED); $result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
//$count = count($result); //$count = count($result);
foreach($result as $field) { foreach($result as $field) {
@ -236,7 +243,7 @@ if (count($_POST)>0) {
echo "<tr>\n"; echo "<tr>\n";
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n"; echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
echo " Order:\n"; echo " ".$text['label-order'].":\n";
echo "</td>\n"; echo "</td>\n";
echo "<td class='vtable' align='left'>\n"; echo "<td class='vtable' align='left'>\n";
echo " <select name='rss_order' class='formfld'>\n"; echo " <select name='rss_order' class='formfld'>\n";
@ -264,9 +271,9 @@ if (count($_POST)>0) {
echo " <tr>"; echo " <tr>";
//echo " <td class='vncellreq' valign='top'></td>"; //echo " <td class='vncellreq' valign='top'></td>";
echo " <td class='' colspan='2' align='left'>"; echo " <td class='' colspan='2' align='left'>";
echo " <strong>Content:</strong> "; echo " <strong>".$text['label-content'].":</strong> ";
if (is_dir($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/includes/tiny_mce')) { if (is_dir($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/includes/tiny_mce')) {
echo " &nbsp; &nbsp; &nbsp; editor &nbsp; <a href='#' title='toggle' onclick=\"toogleEditorMode('rss_description'); return false;\">on/off</a><br>"; echo " &nbsp; &nbsp; &nbsp; editor &nbsp; <a href='#' title='toggle' onclick=\"toogleEditorMode('rss_description'); return false;\">".$text['label-on-off']."</a><br>";
} }
else { else {
echo " <textarea name='rss_description' id='rss_description' class='formfld' cols='20' style='width: 100%' rows='12' ></textarea>"; echo " <textarea name='rss_description' id='rss_description' class='formfld' cols='20' style='width: 100%' rows='12' ></textarea>";
@ -330,7 +337,7 @@ if (count($_POST)>0) {
echo " <tr>"; echo " <tr>";
echo " <td class='' colspan='2' align='right'>"; echo " <td class='' colspan='2' align='right'>";
echo " <input type='submit' class='btn' name='submit' value='Add $module_title'>\n"; echo " <input type='submit' class='btn' name='submit' value='".$text['button-add-title']." $module_title'>\n";
echo " </td>"; echo " </td>";
echo " </tr>"; echo " </tr>";
echo "</table>"; echo "</table>";

View File

@ -22,6 +22,7 @@
Contributor(s): Contributor(s):
Mark J Crane <markjcrane@fusionpbx.com> Mark J Crane <markjcrane@fusionpbx.com>
James Rose <james.o.rose@gmail.com>
*/ */
include "root.php"; include "root.php";
require_once "includes/require.php"; require_once "includes/require.php";
@ -35,6 +36,11 @@ else {
exit; exit;
} }
//add multi-lingual support
require_once "app_languages.php";
foreach($text as $key => $value) {
$text[$key] = $value[$_SESSION['domain']['language']['code']];
}
if (count($_GET)>0) { if (count($_GET)>0) {
$rss_uuid = check_str($_GET["rss_uuid"]); $rss_uuid = check_str($_GET["rss_uuid"]);
@ -52,7 +58,7 @@ if (count($_GET)>0) {
require_once "includes/header.php"; require_once "includes/header.php";
echo "<meta http-equiv=\"refresh\" content=\"2;url=rsslist.php?rss_uuid=$rss_uuid\">\n"; echo "<meta http-equiv=\"refresh\" content=\"2;url=rsslist.php?rss_uuid=$rss_uuid\">\n";
echo "<div align='center'>"; echo "<div align='center'>";
echo "Delete Completed"; echo $text['message-delete-done'];
echo "</div>"; echo "</div>";
require_once "includes/footer.php"; require_once "includes/footer.php";
return; return;

View File

@ -22,6 +22,7 @@
Contributor(s): Contributor(s):
Mark J Crane <markjcrane@fusionpbx.com> Mark J Crane <markjcrane@fusionpbx.com>
James Rose <james.o.rose@gmail.com>
*/ */
include "root.php"; include "root.php";
require_once "includes/require.php"; require_once "includes/require.php";
@ -35,6 +36,12 @@ else {
exit; exit;
} }
//add multi-lingual support
require_once "app_languages.php";
foreach($text as $key => $value) {
$text[$key] = $value[$_SESSION['domain']['language']['code']];
}
if (!function_exists('th_order_by')) { if (!function_exists('th_order_by')) {
//html table header order by //html table header order by
function th_order_by($field_name, $columntitle, $order_by, $order) { function th_order_by($field_name, $columntitle, $order_by, $order) {
@ -72,7 +79,7 @@ $order = $_GET["order"];
echo "<table width='100%'>"; echo "<table width='100%'>";
echo "<tr>"; echo "<tr>";
echo "<td align='left'>"; echo "<td align='left'>";
echo " <b>$module_title List</b>"; echo " <b>$module_title ".$text['label-list']."</b>";
echo "</td>"; echo "</td>";
echo "<td align='right'>"; echo "<td align='right'>";
//echo " <input type='button' class='btn' name='' onclick=\"window.location='rssadd.php'\" value='Add $module_title'>&nbsp; &nbsp;\n"; //echo " <input type='button' class='btn' name='' onclick=\"window.location='rssadd.php'\" value='Add $module_title'>&nbsp; &nbsp;\n";
@ -107,11 +114,11 @@ $order = $_GET["order"];
echo "<div align='left'>\n"; echo "<div align='left'>\n";
echo "<table width='100%' border='0' cellpadding='2' cellspacing='0'>\n"; echo "<table width='100%' border='0' cellpadding='2' cellspacing='0'>\n";
echo "<tr>"; echo "<tr>";
echo th_order_by('rss_title', 'Title', $order_by, $order); echo th_order_by('rss_title', $text['label-title'], $order_by, $order);
echo th_order_by('rss_link', 'Link', $order_by, $order); echo th_order_by('rss_link', $text['label-link'], $order_by, $order);
//echo th_order_by('rss_sub_category', 'Template', $order_by, $order); //echo th_order_by('rss_sub_category', 'Template', $order_by, $order);
echo th_order_by('rss_group', 'Group', $order_by, $order); echo th_order_by('rss_group', $text['label-group'], $order_by, $order);
echo th_order_by('rss_order', 'Order', $order_by, $order); echo th_order_by('rss_order', $text['label-order'], $order_by, $order);
if ($result_count == 0) { //no results if ($result_count == 0) { //no results
echo "<td align='right' width='21'>\n"; echo "<td align='right' width='21'>\n";
} }
@ -163,8 +170,8 @@ $order = $_GET["order"];
//echo "</td>"; //echo "</td>";
echo " <td valign='top' align='right'>\n"; echo " <td valign='top' align='right'>\n";
echo " <a href='rssupdate.php?rss_uuid=".$row[rss_uuid]."' alt='edit'>$v_link_label_edit</a>\n"; echo " <a href='rssupdate.php?rss_uuid=".$row[rss_uuid]."' alt='".$text['label-edit']."'>$v_link_label_edit</a>\n";
echo " <a href='rssdelete.php?rss_uuid=".$row[rss_uuid]."' alt='delete' onclick=\"return confirm('Do you really want to delete this?')\">$v_link_label_delete</a>\n"; echo " <a href='rssdelete.php?rss_uuid=".$row[rss_uuid]."' alt='delete' onclick=\"return confirm('".$text['message-confirm-delete']."')\">$v_link_label_delete</a>\n";
echo " </td>\n"; echo " </td>\n";
//echo "<td valign='top' align='right' class='".$row_style[$c]."'>"; //echo "<td valign='top' align='right' class='".$row_style[$c]."'>";

View File

@ -22,6 +22,7 @@
Contributor(s): Contributor(s):
Mark J Crane <markjcrane@fusionpbx.com> Mark J Crane <markjcrane@fusionpbx.com>
James Rose <james.o.rose@gmail.com>
*/ */
include "root.php"; include "root.php";
require_once "includes/require.php"; require_once "includes/require.php";
@ -35,6 +36,12 @@ else {
exit; exit;
} }
//add multi-lingual support
require_once "app_languages.php";
foreach($text as $key => $value) {
$text[$key] = $value[$_SESSION['domain']['language']['code']];
}
//move down more than one level at a time //move down more than one level at a time
//update v_rss set rss_order = (rss_order+1) where rss_order > 2 or rss_order = 2 //update v_rss set rss_order = (rss_order+1) where rss_order > 2 or rss_order = 2
@ -82,7 +89,7 @@ if (count($_GET)>0) {
require_once "includes/header.php"; require_once "includes/header.php";
echo "<meta http-equiv=\"refresh\" content=\"1;url=rsslist.php?rss_uuid=$rss_uuid\">\n"; echo "<meta http-equiv=\"refresh\" content=\"1;url=rsslist.php?rss_uuid=$rss_uuid\">\n";
echo "<div align='center'>"; echo "<div align='center'>";
echo "Item Moved Down"; echo $text['message-item-down'];
echo "</div>"; echo "</div>";
require_once "includes/footer.php"; require_once "includes/footer.php";
return; return;

View File

@ -22,6 +22,7 @@
Contributor(s): Contributor(s):
Mark J Crane <markjcrane@fusionpbx.com> Mark J Crane <markjcrane@fusionpbx.com>
James Rose <james.o.rose@gmail.com>
*/ */
include "root.php"; include "root.php";
require_once "includes/require.php"; require_once "includes/require.php";
@ -35,6 +36,12 @@ else {
exit; exit;
} }
//add multi-lingual support
require_once "app_languages.php";
foreach($text as $key => $value) {
$text[$key] = $value[$_SESSION['domain']['language']['code']];
}
//move down more than one level at a time //move down more than one level at a time
//update v_rss set rss_order = (rss_order+1) where rss_order > 2 or rss_order = 2 //update v_rss set rss_order = (rss_order+1) where rss_order > 2 or rss_order = 2
@ -66,7 +73,7 @@ if (count($_GET)>0) {
require_once "includes/header.php"; require_once "includes/header.php";
echo "<meta http-equiv=\"refresh\" content=\"1;url=rsslist.php?rss_uuid=$rss_uuid\">\n"; echo "<meta http-equiv=\"refresh\" content=\"1;url=rsslist.php?rss_uuid=$rss_uuid\">\n";
echo "<div align='center'>"; echo "<div align='center'>";
echo "Item Moved Up"; echo $text['message-item-up'];
echo "</div>"; echo "</div>";
require_once "includes/footer.php"; require_once "includes/footer.php";
return; return;

View File

@ -22,6 +22,7 @@
Contributor(s): Contributor(s):
Mark J Crane <markjcrane@fusionpbx.com> Mark J Crane <markjcrane@fusionpbx.com>
James Rose <james.o.rose@gmail.com>
*/ */
return; //disabled return; //disabled
@ -37,6 +38,12 @@ else {
exit; exit;
} }
//add multi-lingual support
require_once "app_languages.php";
foreach($text as $key => $value) {
$text[$key] = $value[$_SESSION['domain']['language']['code']];
}
if (count($_POST)>0) { if (count($_POST)>0) {
$rss_uuid = check_str($_POST["rss_uuid"]); $rss_uuid = check_str($_POST["rss_uuid"]);
//$rss_category = check_str($_POST["rss_category"]); //defined in local config.php //$rss_category = check_str($_POST["rss_category"]); //defined in local config.php
@ -115,7 +122,7 @@ if (count($_POST)>0) {
$row_style["0"] = "background-color: #F5F5DC;"; $row_style["0"] = "background-color: #F5F5DC;";
$row_style["1"] = "background-color: #FFFFFF;"; $row_style["1"] = "background-color: #FFFFFF;";
echo "<b>Search Results</b><br>"; echo "<b>".$text['label-search']."</b><br>";
echo "<div align='left'>\n"; echo "<div align='left'>\n";
echo "<table border='0' cellpadding='1' cellspacing='1'>\n"; echo "<table border='0' cellpadding='1' cellspacing='1'>\n";
echo "<tr><td colspan='100%'><img src='/images/spacer.gif' width='100%' height='1' style='background-color: #BBBBBB;'></td></tr>"; echo "<tr><td colspan='100%'><img src='/images/spacer.gif' width='100%' height='1' style='background-color: #BBBBBB;'></td></tr>";
@ -126,10 +133,10 @@ if (count($_POST)>0) {
else { //received results else { //received results
echo "<tr>"; echo "<tr>";
echo "<th nowrap>&nbsp; &nbsp; ID&nbsp; &nbsp; </th>"; echo "<th nowrap>&nbsp; &nbsp; ".$text['label-id']."&nbsp; &nbsp; </th>";
echo "<th nowrap>&nbsp; &nbsp; Category&nbsp; &nbsp; </th>"; echo "<th nowrap>&nbsp; &nbsp; ".$text['label-category']."&nbsp; &nbsp; </th>";
echo "<th nowrap>&nbsp; &nbsp; Sub Category&nbsp; &nbsp; </th>"; echo "<th nowrap>&nbsp; &nbsp; ".$text['label-sub-category']."&nbsp; &nbsp; </th>";
echo "<th nowrap>&nbsp; &nbsp; Title&nbsp; &nbsp; </th>"; echo "<th nowrap>&nbsp; &nbsp; ".$text['label-title']."&nbsp; &nbsp; </th>";
//echo "<th nowrap>&nbsp; &nbsp; rss_link&nbsp; &nbsp; </th>"; //echo "<th nowrap>&nbsp; &nbsp; rss_link&nbsp; &nbsp; </th>";
//echo "<th nowrap>&nbsp; &nbsp; rss_description&nbsp; &nbsp; </th>"; //echo "<th nowrap>&nbsp; &nbsp; rss_description&nbsp; &nbsp; </th>";
//echo "<th nowrap>&nbsp; &nbsp; rss_img&nbsp; &nbsp; </th>"; //echo "<th nowrap>&nbsp; &nbsp; rss_img&nbsp; &nbsp; </th>";
@ -207,7 +214,7 @@ if (count($_POST)>0) {
echo " <td><input type='text' class='txt' name='rss_uuid'></td>"; echo " <td><input type='text' class='txt' name='rss_uuid'></td>";
echo " </tr>"; echo " </tr>";
echo " <tr>"; echo " <tr>";
echo " <td>Category:</td>"; echo " <td>".$text['label-category'].":</td>";
echo " <td><input type='text' class='txt' name='rss_category'></td>"; echo " <td><input type='text' class='txt' name='rss_category'></td>";
echo " </tr>"; echo " </tr>";
//echo " <tr>"; //echo " <tr>";
@ -215,15 +222,15 @@ if (count($_POST)>0) {
//echo " <td><input type='text' class='txt' name='rss_sub_category'></td>"; //echo " <td><input type='text' class='txt' name='rss_sub_category'></td>";
//echo " </tr>"; //echo " </tr>";
echo " <tr>"; echo " <tr>";
echo " <td>Title:</td>"; echo " <td>".$text['label-title'].":</td>";
echo " <td><input type='text' class='txt' name='rss_title'></td>"; echo " <td><input type='text' class='txt' name='rss_title'></td>";
echo " </tr>"; echo " </tr>";
echo " <tr>"; echo " <tr>";
echo " <td>Link:</td>"; echo " <td>".$text['label-link'].":</td>";
echo " <td><input type='text' class='txt' name='rss_link'></td>"; echo " <td><input type='text' class='txt' name='rss_link'></td>";
echo " </tr>"; echo " </tr>";
echo " <tr>"; echo " <tr>";
echo " <td>Desc:</td>"; echo " <td>".$text['label-description'].":</td>";
echo " <td><input type='text' class='txt' name='rss_description'></td>"; echo " <td><input type='text' class='txt' name='rss_description'></td>";
echo " </tr>"; echo " </tr>";
//echo " <tr>"; //echo " <tr>";
@ -259,7 +266,7 @@ if (count($_POST)>0) {
//echo " <td><input type='text' class='txt' name='rss_add_user'></td>"; //echo " <td><input type='text' class='txt' name='rss_add_user'></td>";
//echo " </tr>"; //echo " </tr>";
echo " <tr>"; echo " <tr>";
echo " <td colspan='2' align='right'><input type='submit' name='submit' class='btn' value='Search'></td>"; echo " <td colspan='2' align='right'><input type='submit' name='submit' class='btn' value='".$text['button-search']."'></td>";
echo " </tr>"; echo " </tr>";
echo "</table>"; echo "</table>";
echo "</form>"; echo "</form>";

View File

@ -22,6 +22,7 @@
Contributor(s): Contributor(s):
Mark J Crane <markjcrane@fusionpbx.com> Mark J Crane <markjcrane@fusionpbx.com>
James Rose <james.o.rose@gmail.com>
*/ */
include "root.php"; include "root.php";
require_once "includes/require.php"; require_once "includes/require.php";
@ -35,6 +36,13 @@ else {
exit; exit;
} }
//add multi-lingual support
require_once "app_languages.php";
foreach($text as $key => $value) {
$text[$key] = $value[$_SESSION['domain']['language']['code']];
}
$rss_uuid = $_GET["rss_uuid"]; $rss_uuid = $_GET["rss_uuid"];
if (count($_POST)>0) { if (count($_POST)>0) {
@ -89,7 +97,7 @@ if (count($_POST)>0) {
require_once "includes/header.php"; require_once "includes/header.php";
echo "<meta http-equiv=\"refresh\" content=\"2;url=rsssublist.php?rss_uuid=$rss_uuid\">\n"; echo "<meta http-equiv=\"refresh\" content=\"2;url=rsssublist.php?rss_uuid=$rss_uuid\">\n";
echo "<div align='center'>"; echo "<div align='center'>";
echo "Add Complete"; echo $text['message-add'];
echo "</div>"; echo "</div>";
require_once "includes/footer.php"; require_once "includes/footer.php";
return; return;
@ -109,7 +117,7 @@ if (count($_POST)>0) {
echo "<form method='post' action=''>"; echo "<form method='post' action=''>";
echo "<table width='100%'>"; echo "<table width='100%'>";
echo " <tr>"; echo " <tr>";
echo " <td nowrap>Title:</td>"; echo " <td nowrap>".$text['label-title'].":</td>";
echo " <td width='100%'><input type='text' class='txt' name='rss_sub_title'></td>"; echo " <td width='100%'><input type='text' class='txt' name='rss_sub_title'></td>";
echo " </tr>"; echo " </tr>";
//echo " <tr>"; //echo " <tr>";
@ -117,7 +125,7 @@ if (count($_POST)>0) {
//echo " <td><input type='text' class='txt' name='rss_sub_link'></td>"; //echo " <td><input type='text' class='txt' name='rss_sub_link'></td>";
//echo " </tr>"; //echo " </tr>";
echo " <tr>"; echo " <tr>";
echo " <td valign='top'>Description:</td>"; echo " <td valign='top'>".$text['label-description'].":</td>";
echo " <td>"; echo " <td>";
echo " <textarea class='txt' rows='12' name='rss_sub_description'></textarea>"; echo " <textarea class='txt' rows='12' name='rss_sub_description'></textarea>";
echo " </td>"; echo " </td>";
@ -158,7 +166,7 @@ if (count($_POST)>0) {
//echo " </tr>"; echo " <tr>"; //echo " </tr>"; echo " <tr>";
echo " <td colspan='2' align='right'>"; echo " <td colspan='2' align='right'>";
echo " <input type='hidden' name='rss_uuid' value='$rss_uuid'>"; echo " <input type='hidden' name='rss_uuid' value='$rss_uuid'>";
echo " <input type='submit' name='submit' class='btn' value='Add'>"; echo " <input type='submit' name='submit' class='btn' value='".text['button-add-title']."'>";
echo " </td>"; echo " </td>";
echo " </tr>"; echo " </tr>";
echo "</table>"; echo "</table>";

View File

@ -22,6 +22,7 @@
Contributor(s): Contributor(s):
Mark J Crane <markjcrane@fusionpbx.com> Mark J Crane <markjcrane@fusionpbx.com>
James Rose <james.o.rose@gmail.com>
*/ */
include "root.php"; include "root.php";
require_once "includes/require.php"; require_once "includes/require.php";
@ -35,6 +36,12 @@ else {
exit; exit;
} }
//add multi-lingual support
require_once "app_languages.php";
foreach($text as $key => $value) {
$text[$key] = $value[$_SESSION['domain']['language']['code']];
}
if (count($_POST)>0) { if (count($_POST)>0) {
$rss_sub_category_uuid = uuid(); $rss_sub_category_uuid = uuid();
$rss_category = check_str($_POST["rss_category"]); $rss_category = check_str($_POST["rss_category"]);
@ -68,7 +75,7 @@ if (count($_POST)>0) {
require_once "includes/header.php"; require_once "includes/header.php";
echo "<meta http-equiv=\"refresh\" content=\"5;url=rss_sub_categorylist.php\">\n"; echo "<meta http-equiv=\"refresh\" content=\"5;url=rss_sub_categorylist.php\">\n";
echo "Add Complete"; echo $text['message-add'];
require_once "includes/footer.php"; require_once "includes/footer.php";
return; return;
} }
@ -83,7 +90,7 @@ echo " <br>";
echo "<form method='post' action=''>"; echo "<form method='post' action=''>";
echo "<table>"; echo "<table>";
echo " <tr>"; echo " <tr>";
echo " <td>RSS Category:</td>"; echo " <td>".$text['label-rss-category'].":</td>";
echo " <td><input type='text' name='rss_category'></td>"; echo " <td><input type='text' name='rss_category'></td>";
echo " </tr>"; echo " </tr>";
echo " <tr>"; echo " <tr>";
@ -103,7 +110,7 @@ echo " <td>rss_add_date:</td>";
echo " <td><input type='text' name='rss_add_date'></td>"; echo " <td><input type='text' name='rss_add_date'></td>";
echo " </tr>\n"; echo " </tr>\n";
echo " <tr>"; echo " <tr>";
echo " <td colspan='2' align='right'><input type='submit' name='submit' value='Add'></td>"; echo " <td colspan='2' align='right'><input type='submit' name='submit' value='".$text['button-add-title']."'></td>";
echo " </tr>"; echo " </tr>";
echo "</table>"; echo "</table>";
echo "</form>"; echo "</form>";

View File

@ -22,6 +22,7 @@
Contributor(s): Contributor(s):
Mark J Crane <markjcrane@fusionpbx.com> Mark J Crane <markjcrane@fusionpbx.com>
James Rose <james.o.rose@gmail.com>
*/ */
include "root.php"; include "root.php";
require_once "includes/require.php"; require_once "includes/require.php";
@ -35,6 +36,11 @@ else {
exit; exit;
} }
//add multi-lingual support
require_once "app_languages.php";
foreach($text as $key => $value) {
$text[$key] = $value[$_SESSION['domain']['language']['code']];
}
require_once "includes/header.php"; require_once "includes/header.php";
@ -188,8 +194,8 @@ else { //received results
} //end if results } //end if results
echo "</table>\n"; echo "</table>\n";
echo "<input type='button' class='btn' name='' onclick=\"window.location='rss_sub_categorysearch.php'\" value='Search'>&nbsp; &nbsp;\n"; echo "<input type='button' class='btn' name='' onclick=\"window.location='rss_sub_categorysearch.php'\" value='".$text['button-search']."'>&nbsp; &nbsp;\n";
echo "<input type='button' class='btn' name='' onclick=\"window.location='rss_sub_categoryadd.php'\" value='Add'>&nbsp; &nbsp;\n"; echo "<input type='button' class='btn' name='' onclick=\"window.location='rss_sub_categoryadd.php'\" value='".$text['button-add-title']."'>&nbsp; &nbsp;\n";
echo "</div>"; echo "</div>";
echo "<br><br>"; echo "<br><br>";

View File

@ -22,6 +22,7 @@
Contributor(s): Contributor(s):
Mark J Crane <markjcrane@fusionpbx.com> Mark J Crane <markjcrane@fusionpbx.com>
James Rose <james.o.rose@gmail.com>
*/ */
include "root.php"; include "root.php";
require_once "includes/require.php"; require_once "includes/require.php";
@ -35,6 +36,12 @@ else {
exit; exit;
} }
//add multi-lingual support
require_once "app_languages.php";
foreach($text as $key => $value) {
$text[$key] = $value[$_SESSION['domain']['language']['code']];
}
if (count($_POST)>0) { if (count($_POST)>0) {
$rss_sub_category_uuid = check_str($_POST["rss_sub_category_uuid"]); $rss_sub_category_uuid = check_str($_POST["rss_sub_category_uuid"]);
$rss_category = check_str($_POST["rss_category"]); $rss_category = check_str($_POST["rss_category"]);
@ -58,7 +65,7 @@ if (count($_POST)>0) {
//edit: make sure the meta redirect url is correct //edit: make sure the meta redirect url is correct
require_once "includes/header.php"; require_once "includes/header.php";
echo "<meta http-equiv=\"refresh\" content=\"5;url=rss_sub_categorylist.php\">\n"; echo "<meta http-equiv=\"refresh\" content=\"5;url=rss_sub_categorylist.php\">\n";
echo "Update Complete"; echo $text['message-update'];
require_once "includes/footer.php"; require_once "includes/footer.php";
return; return;
} }
@ -117,7 +124,7 @@ echo " </tr>";
echo " <tr>"; echo " <tr>";
echo " <td colspan='2' align='right'>"; echo " <td colspan='2' align='right'>";
echo " <input type='hidden' name='rss_sub_category_uuid' value='$rss_sub_category_uuid'>"; echo " <input type='hidden' name='rss_sub_category_uuid' value='$rss_sub_category_uuid'>";
echo " <input type='submit' name='submit' value='Update'>"; echo " <input type='submit' name='submit' value='".$text['button-update']."'>";
echo " </td>"; echo " </td>";
echo " </tr>"; echo " </tr>";
echo "</table>"; echo "</table>";

View File

@ -22,6 +22,7 @@
Contributor(s): Contributor(s):
Mark J Crane <markjcrane@fusionpbx.com> Mark J Crane <markjcrane@fusionpbx.com>
James Rose <james.o.rose@gmail.com>
*/ */
include "root.php"; include "root.php";
require_once "includes/require.php"; require_once "includes/require.php";
@ -35,6 +36,13 @@ else {
exit; exit;
} }
//add multi-lingual support
require_once "app_languages.php";
foreach($text as $key => $value) {
$text[$key] = $value[$_SESSION['domain']['language']['code']];
}
if (count($_GET)>0) { if (count($_GET)>0) {
$rss_uuid = check_str($_GET["rss_uuid"]); $rss_uuid = check_str($_GET["rss_uuid"]);
$rss_sub_uuid = check_str($_GET["rss_sub_uuid"]); $rss_sub_uuid = check_str($_GET["rss_sub_uuid"]);
@ -51,7 +59,7 @@ if (count($_GET)>0) {
require_once "includes/header.php"; require_once "includes/header.php";
echo "<meta http-equiv=\"refresh\" content=\"2;url=rsssublist.php?rss_uuid=$rss_uuid\">\n"; echo "<meta http-equiv=\"refresh\" content=\"2;url=rsssublist.php?rss_uuid=$rss_uuid\">\n";
echo "<div align='center'>"; echo "<div align='center'>";
echo "Delete Completed"; echo $text['message-delete-done'];
echo "</div>"; echo "</div>";
require_once "includes/footer.php"; require_once "includes/footer.php";
return; return;

View File

@ -22,6 +22,7 @@
Contributor(s): Contributor(s):
Mark J Crane <markjcrane@fusionpbx.com> Mark J Crane <markjcrane@fusionpbx.com>
James Rose <james.o.rose@gmail.com>
*/ */
include "root.php"; include "root.php";
require_once "includes/require.php"; require_once "includes/require.php";
@ -35,6 +36,12 @@ else {
exit; exit;
} }
//add multi-lingual support
require_once "app_languages.php";
foreach($text as $key => $value) {
$text[$key] = $value[$_SESSION['domain']['language']['code']];
}
$rss_uuid = $_GET["rss_uuid"]; $rss_uuid = $_GET["rss_uuid"];
$order_by = $_GET["order_by"]; $order_by = $_GET["order_by"];
$order = $_GET["order"]; $order = $_GET["order"];
@ -48,7 +55,7 @@ require_once "includes/header.php";
echo " <td align=\"left\">\n"; echo " <td align=\"left\">\n";
echo " <br>"; echo " <br>";
echo " <b>$module_title Details</b>"; echo " <b>$module_title ".$text['label-details']."</b>";
$sql = ""; $sql = "";
$sql .= "select * from v_rss "; $sql .= "select * from v_rss ";
$sql .= "where domain_uuid = '$domain_uuid' "; $sql .= "where domain_uuid = '$domain_uuid' ";
@ -81,10 +88,10 @@ require_once "includes/header.php";
//echo "<td valign='top'>".$row[rss_category]."</td>"; //echo "<td valign='top'>".$row[rss_category]."</td>";
echo "<tr>"; echo "<tr>";
echo " <td valign='top'>Title: &nbsp;</td>"; echo " <td valign='top'>".$text['label-title'].": &nbsp;</td>";
echo " <td valign='top'><b>".$row[rss_title]."</b></td>"; echo " <td valign='top'><b>".$row[rss_title]."</b></td>";
echo " <td valign='top' align='right'>"; echo " <td valign='top' align='right'>";
echo " <input type='button' class='btn' name='' onclick=\"window.location='rssupdate.php?rss_uuid=".$row[rss_uuid]."'\" value='Update'>"; echo " <input type='button' class='btn' name='' onclick=\"window.location='rssupdate.php?rss_uuid=".$row[rss_uuid]."'\" value='".$text['button-update']."'>";
echo " </td>"; echo " </td>";
$rss_description = $row[rss_description]; $rss_description = $row[rss_description];
//$rss_description = str_replace ("\r\n", "<br>", $rss_description); //$rss_description = str_replace ("\r\n", "<br>", $rss_description);
@ -93,24 +100,24 @@ require_once "includes/header.php";
echo "<tr>"; echo "<tr>";
echo " <td valign='top'>Template: &nbsp;</td>"; echo " <td valign='top'>".$text['label-template'].": &nbsp;</td>";
echo " <td valign='top'>".$row[rss_sub_category]."</td>"; echo " <td valign='top'>".$row[rss_sub_category]."</td>";
echo "</tr>"; echo "</tr>";
echo "<tr>"; echo "<tr>";
echo " <td valign='top'>Group: &nbsp;</td>"; echo " <td valign='top'>".$text['label-group'].": &nbsp;</td>";
echo " <td valign='top'>".$row[rss_group]."</td>"; echo " <td valign='top'>".$row[rss_group]."</td>";
echo "</tr>"; echo "</tr>";
if (strlen($row[rss_order]) > 0) { if (strlen($row[rss_order]) > 0) {
echo "<tr>"; echo "<tr>";
echo " <td valign='top'>Order: &nbsp;</td>"; echo " <td valign='top'>".text['label-order'].": &nbsp;</td>";
echo " <td valign='top'>".$row[rss_order]."</td>"; echo " <td valign='top'>".$row[rss_order]."</td>";
echo "</tr>"; echo "</tr>";
} }
//echo "<td valign='top'>".$row[rss_link]."</td>"; //echo "<td valign='top'>".$row[rss_link]."</td>";
echo " <td valign='top'>Description: &nbsp;</td>"; echo " <td valign='top'>".$text['label-description'].": &nbsp;</td>";
echo " <td valign='top' colspan='2'>".$rss_description."</td>"; echo " <td valign='top' colspan='2'>".$rss_description."</td>";
//echo "<td valign='top'>".$row[rss_img]."</td>"; //echo "<td valign='top'>".$row[rss_img]."</td>";
@ -380,12 +387,12 @@ require_once "includes/header.php";
//echo "<td valign='top'>".$row[rss_sub_add_user]."</td>"; //echo "<td valign='top'>".$row[rss_sub_add_user]."</td>";
echo "<td valign='top'>"; echo "<td valign='top'>";
echo " <input type='button' class='btn' name='' onclick=\"if (confirm('Are you sure you wish to continue?')) { window.location='rsssubdelete.php?rss_uuid=".$row[rss_uuid]."&rss_sub_uuid=".$row[rss_sub_uuid]."' }\" value='Delete'>"; echo " <input type='button' class='btn' name='' onclick=\"if (confirm('".$text['message-confirm-delete']."')) { window.location='rsssubdelete.php?rss_uuid=".$row[rss_uuid]."&rss_sub_uuid=".$row[rss_sub_uuid]."' }\" value='".$text['button-delete']."'>";
echo "</td>"; echo "</td>";
echo "<td valign='top' align='right'>"; echo "<td valign='top' align='right'>";
echo " &nbsp;"; echo " &nbsp;";
echo " <input type='button' class='btn' name='' onclick=\"window.location='rsssubupdate.php?rss_uuid=".$rss_uuid."&rss_sub_uuid=".$row[rss_sub_uuid]."'\" value='Update'>"; echo " <input type='button' class='btn' name='' onclick=\"window.location='rsssubupdate.php?rss_uuid=".$rss_uuid."&rss_sub_uuid=".$row[rss_sub_uuid]."'\" value='".$text['button-update']."'>";
echo " &nbsp; \n"; echo " &nbsp; \n";
//echo " <a href='rsssubupdate.php?rss_uuid=".$rss_uuid."&rss_sub_uuid=".$row[rss_sub_uuid]."'>Update</a>&nbsp;"; //echo " <a href='rsssubupdate.php?rss_uuid=".$rss_uuid."&rss_sub_uuid=".$row[rss_sub_uuid]."'>Update</a>&nbsp;";
echo "</td>"; echo "</td>";
@ -428,7 +435,7 @@ require_once "includes/header.php";
//echo "<input type='button' class='btn' name='' onclick=\"window.location='rsssubsearch.php'\" value='Search'>&nbsp; &nbsp;\n"; //echo "<input type='button' class='btn' name='' onclick=\"window.location='rsssubsearch.php'\" value='Search'>&nbsp; &nbsp;\n";
if ($rss_sub_show == 1) { if ($rss_sub_show == 1) {
echo "<input type='button' class='btn' name='' onclick=\"window.location='rsssubadd.php?rss_uuid=".$rss_uuid."'\" value='Add $rss_sub_title'>&nbsp; &nbsp;\n"; echo "<input type='button' class='btn' name='' onclick=\"window.location='rsssubadd.php?rss_uuid=".$rss_uuid."'\" value='".$text['button-add-title']." $rss_sub_title'>&nbsp; &nbsp;\n";
} }
echo "</div>"; echo "</div>";

View File

@ -22,6 +22,7 @@
Contributor(s): Contributor(s):
Mark J Crane <markjcrane@fusionpbx.com> Mark J Crane <markjcrane@fusionpbx.com>
James Rose <james.o.rose@gmail.com>
*/ */
include "root.php"; include "root.php";
require_once "includes/require.php"; require_once "includes/require.php";
@ -35,6 +36,11 @@ else {
exit; exit;
} }
//add multi-lingual support
require_once "app_languages.php";
foreach($text as $key => $value) {
$text[$key] = $value[$_SESSION['domain']['language']['code']];
}
if (count($_POST)>0) { if (count($_POST)>0) {
$rss_sub_uuid = check_str($_POST["rss_sub_uuid"]); $rss_sub_uuid = check_str($_POST["rss_sub_uuid"]);
@ -109,7 +115,7 @@ if (count($_POST)>0) {
$row_style["0"] = "background-color: #F5F5DC;"; $row_style["0"] = "background-color: #F5F5DC;";
$row_style["1"] = "background-color: #FFFFFF;"; $row_style["1"] = "background-color: #FFFFFF;";
echo "<b>Search Results</b><br>"; echo "<b>".$text['label-search']."</b><br>";
echo "<div align='left'>\n"; echo "<div align='left'>\n";
echo "<table border='0' cellpadding='1' cellspacing='1'>\n"; echo "<table border='0' cellpadding='1' cellspacing='1'>\n";
echo "<tr><td colspan='100%'><img src='/images/spacer.gif' width='100%' height='1' style='background-color: #BBBBBB;'></td></tr>"; echo "<tr><td colspan='100%'><img src='/images/spacer.gif' width='100%' height='1' style='background-color: #BBBBBB;'></td></tr>";
@ -120,9 +126,9 @@ if (count($_POST)>0) {
else { //received results else { //received results
echo "<tr>"; echo "<tr>";
echo "<th nowrap>&nbsp; &nbsp; Sub ID&nbsp; &nbsp; </th>"; echo "<th nowrap>&nbsp; &nbsp; ".$text['label-sub-id']."&nbsp; &nbsp; </th>";
echo "<th nowrap>&nbsp; &nbsp; Id&nbsp; &nbsp; </th>"; echo "<th nowrap>&nbsp; &nbsp; ".$text['label-id']."&nbsp; &nbsp; </th>";
echo "<th nowrap>&nbsp; &nbsp; Title&nbsp; &nbsp; </th>"; echo "<th nowrap>&nbsp; &nbsp; ".$text['label-title']."&nbsp; &nbsp; </th>";
//echo "<th nowrap>&nbsp; &nbsp; Link&nbsp; &nbsp; </th>"; //echo "<th nowrap>&nbsp; &nbsp; Link&nbsp; &nbsp; </th>";
//echo "<th nowrap>&nbsp; &nbsp; rss_sub_description&nbsp; &nbsp; </th>"; //echo "<th nowrap>&nbsp; &nbsp; rss_sub_description&nbsp; &nbsp; </th>";
//echo "<th nowrap>&nbsp; &nbsp; rss_sub_optional_1&nbsp; &nbsp; </th>"; //echo "<th nowrap>&nbsp; &nbsp; rss_sub_optional_1&nbsp; &nbsp; </th>";
@ -194,23 +200,23 @@ if (count($_POST)>0) {
echo "<form method='post' action=''>"; echo "<form method='post' action=''>";
echo "<table>"; echo "<table>";
echo " <tr>"; echo " <tr>";
echo " <td>Sub ID:</td>"; echo " <td>".$text['label-sub-id'].":</td>";
echo " <td><input type='text' class='txt' name='rss_sub_uuid'></td>"; echo " <td><input type='text' class='txt' name='rss_sub_uuid'></td>";
echo " </tr>"; echo " </tr>";
echo " <tr>"; echo " <tr>";
echo " <td>ID:</td>"; echo " <td>".$text['label-id'].":</td>";
echo " <td><input type='text' class='txt' name='rss_uuid'></td>"; echo " <td><input type='text' class='txt' name='rss_uuid'></td>";
echo " </tr>"; echo " </tr>";
echo " <tr>"; echo " <tr>";
echo " <td>Sub Title:</td>"; echo " <td>".$text['label-sub-title'].":</td>";
echo " <td><input type='text' class='txt' name='rss_sub_title'></td>"; echo " <td><input type='text' class='txt' name='rss_sub_title'></td>";
echo " </tr>"; echo " </tr>";
echo " <tr>"; echo " <tr>";
echo " <td>Sub Link:</td>"; echo " <td>".text['label-sub-link'].":</td>";
echo " <td><input type='text' class='txt' name='rss_sub_link'></td>"; echo " <td><input type='text' class='txt' name='rss_sub_link'></td>";
echo " </tr>"; echo " </tr>";
echo " <tr>"; echo " <tr>";
echo " <td>Sub Desc:</td>"; echo " <td>".$text['label-sub-desc'].":</td>";
echo " <td><input type='text' class='txt' name='rss_sub_description'></td>"; echo " <td><input type='text' class='txt' name='rss_sub_description'></td>";
echo " </tr>"; echo " </tr>";
//echo " <tr>"; //echo " <tr>";
@ -242,7 +248,7 @@ if (count($_POST)>0) {
//echo " <td><input type='text' class='txt' name='rss_sub_add_user'></td>"; //echo " <td><input type='text' class='txt' name='rss_sub_add_user'></td>";
//echo " </tr>"; //echo " </tr>";
echo " <tr>"; echo " <tr>";
echo " <td colspan='2' align='right'><input type='submit' name='submit' class='btn' value='Search'></td>"; echo " <td colspan='2' align='right'><input type='submit' name='submit' class='btn' value='".$text['button-search']."'></td>";
echo " </tr>"; echo " </tr>";
echo "</table>"; echo "</table>";
echo "</form>"; echo "</form>";

View File

@ -22,6 +22,7 @@
Contributor(s): Contributor(s):
Mark J Crane <markjcrane@fusionpbx.com> Mark J Crane <markjcrane@fusionpbx.com>
James Rose <james.o.rose@gmail.com>
*/ */
include "root.php"; include "root.php";
require_once "includes/require.php"; require_once "includes/require.php";
@ -35,6 +36,12 @@ else {
exit; exit;
} }
//add multi-lingual support
require_once "app_languages.php";
foreach($text as $key => $value) {
$text[$key] = $value[$_SESSION['domain']['language']['code']];
}
$rss_uuid = $_GET["rss_uuid"]; $rss_uuid = $_GET["rss_uuid"];
if (count($_POST)>0 && $_POST["persistform"] == "0") { if (count($_POST)>0 && $_POST["persistform"] == "0") {
@ -52,10 +59,10 @@ if (count($_POST)>0 && $_POST["persistform"] == "0") {
$rss_sub_add_user = check_str($_POST["rss_sub_add_user"]); $rss_sub_add_user = check_str($_POST["rss_sub_add_user"]);
$msg = ''; $msg = '';
if (strlen($rss_uuid) == 0) { $msg .= "Error missing rss_uuid.<br>\n"; } if (strlen($rss_uuid) == 0) { $msg .= $text['message-error-missing']." rss_uuid.<br>\n"; }
if (strlen($rss_sub_uuid) == 0) { $msg .= "Error missing rss_sub_uuid.<br>\n"; } if (strlen($rss_sub_uuid) == 0) { $msg .= $text['message-error-missing']." rss_sub_uuid.<br>\n"; }
//if (strlen($rss_sub_title) == 0) { $msg .= "Please provide a title.<br>\n"; } //if (strlen($rss_sub_title) == 0) { $msg .= "Please provide a title.<br>\n"; }
if (strlen($rss_sub_description) == 0) { $msg .= "Please provide a description.<br>\n"; } if (strlen($rss_sub_description) == 0) { $msg .= $text['message-description']."<br>\n"; }
if (strlen($msg) > 0) { if (strlen($msg) > 0) {
require_once "includes/persistform.php"; require_once "includes/persistform.php";
@ -101,7 +108,7 @@ if (count($_POST)>0 && $_POST["persistform"] == "0") {
require_once "includes/header.php"; require_once "includes/header.php";
echo "<meta http-equiv=\"refresh\" content=\"2;url=rsssublist.php?rss_uuid=$rss_uuid&rss_sub_uuid=$rss_sub_uuid\">\n"; echo "<meta http-equiv=\"refresh\" content=\"2;url=rsssublist.php?rss_uuid=$rss_uuid&rss_sub_uuid=$rss_sub_uuid\">\n";
echo "<div align='center'>"; echo "<div align='center'>";
echo "Update Complete"; echo $text['message-update'];
echo "</div>"; echo "</div>";
require_once "includes/footer.php"; require_once "includes/footer.php";
return; return;
@ -151,15 +158,15 @@ else {
//echo " <td><input type='text' name='rss_uuid' class='txt' value='$rss_uuid'></td>"; //echo " <td><input type='text' name='rss_uuid' class='txt' value='$rss_uuid'></td>";
//echo " </tr>"; //echo " </tr>";
echo " <tr>"; echo " <tr>";
echo " <td nowrap>Sub Title:</td>"; echo " <td nowrap>".$text['label-sub-title'].":</td>";
echo " <td width='100%'><input type='text' name='rss_sub_title' class='txt' value='$rss_sub_title'></td>"; echo " <td width='100%'><input type='text' name='rss_sub_title' class='txt' value='$rss_sub_title'></td>";
echo " </tr>"; echo " </tr>";
echo " <tr>"; echo " <tr>";
echo " <td>Sub Link:</td>"; echo " <td>".$text['label-sub-link'].":</td>";
echo " <td><input type='text' name='rss_sub_link' class='txt' value='$rss_sub_link'></td>"; echo " <td><input type='text' name='rss_sub_link' class='txt' value='$rss_sub_link'></td>";
echo " </tr>"; echo " </tr>";
echo " <tr>"; echo " <tr>";
echo " <td valign='top'>Description:</td>"; echo " <td valign='top'>".$text['label-description'].":</td>";
echo " <td>"; echo " <td>";
echo " <textarea name='rss_sub_description' rows='12' class='txt'>$rss_sub_description</textarea>"; echo " <textarea name='rss_sub_description' rows='12' class='txt'>$rss_sub_description</textarea>";
echo " </td>"; echo " </td>";
@ -190,7 +197,7 @@ else {
echo " <input type='hidden' name='rss_uuid' value='$rss_uuid'>"; echo " <input type='hidden' name='rss_uuid' value='$rss_uuid'>";
echo " <input type='hidden' name='persistform' value='0'>"; echo " <input type='hidden' name='persistform' value='0'>";
echo " <input type='hidden' name='rss_sub_uuid' value='$rss_sub_uuid'>"; echo " <input type='hidden' name='rss_sub_uuid' value='$rss_sub_uuid'>";
echo " <input type='submit' name='submit' class='btn' value='Update'>"; echo " <input type='submit' name='submit' class='btn' value='".$text['button-update']."'>";
echo " </td>"; echo " </td>";
echo " </tr>"; echo " </tr>";
echo "</table>"; echo "</table>";

View File

@ -22,6 +22,7 @@
Contributor(s): Contributor(s):
Mark J Crane <markjcrane@fusionpbx.com> Mark J Crane <markjcrane@fusionpbx.com>
James Rose <james.o.rose@gmail.com>
*/ */
include "root.php"; include "root.php";
require_once "includes/require.php"; require_once "includes/require.php";
@ -35,6 +36,12 @@ else {
exit; exit;
} }
//add multi-lingual support
require_once "app_languages.php";
foreach($text as $key => $value) {
$text[$key] = $value[$_SESSION['domain']['language']['code']];
}
if (count($_POST)>0) { if (count($_POST)>0) {
$rss_uuid = check_str($_POST["rss_uuid"]); $rss_uuid = check_str($_POST["rss_uuid"]);
@ -87,7 +94,7 @@ if (count($_POST)>0) {
require_once "includes/header.php"; require_once "includes/header.php";
echo "<meta http-equiv=\"refresh\" content=\"2;url=rsslist.php\">\n"; echo "<meta http-equiv=\"refresh\" content=\"2;url=rsslist.php\">\n";
echo "<div align='center'>"; echo "<div align='center'>";
echo "Update Complete"; echo $text['message-update'];
echo "</div>"; echo "</div>";
require_once "includes/footer.php"; require_once "includes/footer.php";
return; return;
@ -172,8 +179,8 @@ else {
echo "<table width='100%' cellpadding='6' cellspacing='0'>"; echo "<table width='100%' cellpadding='6' cellspacing='0'>";
echo "<tr>\n"; echo "<tr>\n";
echo "<td width='30%' nowrap valign='top'><b>Content Edit</b></td>\n"; echo "<td width='30%' nowrap valign='top'><b>".$text['label-content-edit']."</b></td>\n";
echo "<td width='70%' align='right' valign='top'><input type='button' class='btn' name='' alt='back' onclick=\"window.location='rsslist.php'\" value='Back'><br /><br /></td>\n"; echo "<td width='70%' align='right' valign='top'><input type='button' class='btn' name='' alt='".$text['button-back']."' onclick=\"window.location='rsslist.php'\" value='".$text['button-back']."'><br /><br /></td>\n";
echo "</tr>\n"; echo "</tr>\n";
//echo " <tr>"; //echo " <tr>";
@ -185,16 +192,16 @@ else {
//echo " <td class='vtable'><input type='text' class='formfld' name='rss_sub_category' value='$rss_sub_category'></td>"; //echo " <td class='vtable'><input type='text' class='formfld' name='rss_sub_category' value='$rss_sub_category'></td>";
//echo " </tr>"; //echo " </tr>";
echo " <tr>"; echo " <tr>";
echo " <td width='30%' class='vncellreq' nowrap>Title:</td>"; echo " <td width='30%' class='vncellreq' nowrap>".$text['label-title'].":</td>";
echo " <td width='70%' class='vtable' width='100%'><input type='text' class='formfld' name='rss_title' value='$rss_title'></td>"; echo " <td width='70%' class='vtable' width='100%'><input type='text' class='formfld' name='rss_title' value='$rss_title'></td>";
echo " </tr>"; echo " </tr>";
echo " <tr>"; echo " <tr>";
echo " <td class='vncellreq'>Link:</td>"; echo " <td class='vncellreq'>".$text['label-link'].":</td>";
echo " <td class='vtable'><input type='text' class='formfld' name='rss_link' value='$rss_link'></td>"; echo " <td class='vtable'><input type='text' class='formfld' name='rss_link' value='$rss_link'></td>";
echo " </tr>"; echo " </tr>";
echo " <tr>"; echo " <tr>";
echo " <td class='vncellreq'>Group:</td>"; echo " <td class='vncellreq'>".$text['label-group'].":</td>";
echo " <td class='vtable'>"; echo " <td class='vtable'>";
//echo " <input type='text' class='formfld' name='menuparentid' value='$menuparentid'>"; //echo " <input type='text' class='formfld' name='menuparentid' value='$menuparentid'>";
@ -254,7 +261,7 @@ else {
*/ */
echo " <tr>"; echo " <tr>";
echo " <td class='vncellreq'>Type:</td>"; echo " <td class='vncellreq'>".$text['label-type'].":</td>";
echo " <td class='vtable'>"; echo " <td class='vtable'>";
echo " <select name=\"rss_optional_1\" class='formfld'>\n"; echo " <select name=\"rss_optional_1\" class='formfld'>\n";
if ($rss_optional_1 == "text/html") { echo "<option value=\"text/html\" selected>text/html</option>\n"; } if ($rss_optional_1 == "text/html") { echo "<option value=\"text/html\" selected>text/html</option>\n"; }
@ -268,7 +275,7 @@ else {
echo "<tr>\n"; echo "<tr>\n";
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n"; echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
echo " Order:\n"; echo " ".$text['label-order'].":\n";
echo "</td>\n"; echo "</td>\n";
echo "<td class='vtable' align='left'>\n"; echo "<td class='vtable' align='left'>\n";
echo " <select name='rss_order' class='formfld'>\n"; echo " <select name='rss_order' class='formfld'>\n";
@ -296,10 +303,10 @@ else {
echo " <tr>"; echo " <tr>";
echo " <td class='' colspan='2' align='left'>"; echo " <td class='' colspan='2' align='left'>";
echo " <strong>Content:</strong> "; echo " <strong>".$text['label-content'].":</strong> ";
if ($rss_optional_1 == "text/html") { if ($rss_optional_1 == "text/html") {
if (is_dir($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/includes/tiny_mce')) { if (is_dir($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/includes/tiny_mce')) {
echo " &nbsp; &nbsp; &nbsp; editor &nbsp; <a href='#' title='toggle' onclick=\"toogleEditorMode('rss_description'); return false;\">on/off</a><br>"; echo " &nbsp; &nbsp; &nbsp; editor &nbsp; <a href='#' title='toggle' onclick=\"toogleEditorMode('rss_description'); return false;\">".$text['label-on-off']."</a><br>";
} }
echo " <textarea name='rss_description' id='rss_description' class='formfld' cols='20' style='width: 100%' rows='12' >$rss_description</textarea>"; echo " <textarea name='rss_description' id='rss_description' class='formfld' cols='20' style='width: 100%' rows='12' >$rss_description</textarea>";
} }
@ -370,7 +377,7 @@ else {
//echo "<input type=\"button\" value=\"Load\" onclick=\"ajaxLoad('rss_description', ajaxresponse);\" />"; //echo "<input type=\"button\" value=\"Load\" onclick=\"ajaxLoad('rss_description', ajaxresponse);\" />";
echo " <input type='hidden' name='rss_uuid' value='$rss_uuid'>"; echo " <input type='hidden' name='rss_uuid' value='$rss_uuid'>";
echo " <input type='submit' class='btn' name='submit' value='Save'>"; echo " <input type='submit' class='btn' name='submit' value='".$text['button-save']."'>";
echo " </td>"; echo " </td>";
echo " </tr>"; echo " </tr>";
echo "</table>"; echo "</table>";