Add a missing file sip_profile_copy.php to the dev branch.
This commit is contained in:
@@ -0,0 +1,351 @@
|
||||
<?php
|
||||
//application details
|
||||
$apps[$x]['name'] = "Content Manager";
|
||||
$apps[$x]['uuid'] = '892c8d0b-bfa5-1bdf-e090-a974da7a7c5e';
|
||||
$apps[$x]['category'] = 'System';
|
||||
$apps[$x]['subcategory'] = '';
|
||||
$apps[$x]['version'] = '';
|
||||
$apps[$x]['license'] = 'Mozilla Public License 1.1';
|
||||
$apps[$x]['url'] = 'http://www.fusionpbx.com';
|
||||
$apps[$x]['description']['en'] = 'Manage Content for any page in the interface.';
|
||||
|
||||
//menu details
|
||||
$apps[$x]['menu'][0]['title']['en'] = 'Content Manager';
|
||||
$apps[$x]['menu'][0]['uuid'] = '90397352-395c-40f6-2087-887144abc06d';
|
||||
$apps[$x]['menu'][0]['parent_uuid'] = '02194288-6d56-6d3e-0b1a-d53a2bc10788';
|
||||
$apps[$x]['menu'][0]['category'] = 'internal';
|
||||
$apps[$x]['menu'][0]['path'] = '/app/content/rsslist.php';
|
||||
$apps[$x]['menu'][0]['groups'][] = 'admin';
|
||||
$apps[$x]['menu'][0]['groups'][] = 'superadmin';
|
||||
|
||||
//permission details
|
||||
$apps[$x]['permissions'][0]['name'] = 'content_view';
|
||||
$apps[$x]['permissions'][0]['groups'][] = 'admin';
|
||||
$apps[$x]['permissions'][0]['groups'][] = 'superadmin';
|
||||
|
||||
$apps[$x]['permissions'][1]['name'] = 'content_add';
|
||||
$apps[$x]['permissions'][1]['groups'][] = 'admin';
|
||||
$apps[$x]['permissions'][1]['groups'][] = 'superadmin';
|
||||
|
||||
$apps[$x]['permissions'][2]['name'] = 'content_edit';
|
||||
$apps[$x]['permissions'][2]['groups'][] = 'admin';
|
||||
$apps[$x]['permissions'][2]['groups'][] = 'superadmin';
|
||||
|
||||
$apps[$x]['permissions'][3]['name'] = 'content_delete';
|
||||
$apps[$x]['permissions'][3]['groups'][] = 'admin';
|
||||
$apps[$x]['permissions'][3]['groups'][] = 'superadmin';
|
||||
|
||||
//schema details
|
||||
$y = 0; //table array index
|
||||
$z = 0; //field array index
|
||||
$apps[$x]['db'][$y]['table'] = 'v_rss';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['text'] = 'id';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'][] = 'rssid';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'][] = 'rss_id';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'serial';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'integer';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'INT NOT NULL AUTO_INCREMENT';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en'] = '';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['deprecated'] = 'true';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'rss_uuid';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'uuid';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'char(36)';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['key']['type'] = 'primary';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en'] = '';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'domain_uuid';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'uuid';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'char(36)';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['key']['type'] = 'foreign';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['table'] = 'v_domains';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['field'] = 'domain_uuid';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en'] = '';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'v_id';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en'] = '';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['deprecated'] = 'true';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['text'] = 'rss_language';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = 'rsslanguage';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en'] = '';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['text'] = 'rss_category';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = 'rsscategory';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en'] = '';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['text'] = 'rss_sub_category';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = 'rsssubcategory';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en'] = '';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['text'] = 'rss_title';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = 'rsstitle';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en'] = '';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['text'] = 'rss_link';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = 'rsslink';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en'] = '';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['text'] = 'rss_description';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = 'rssdesc';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en'] = '';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['text'] = 'rss_img';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = 'rssimg';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'bytea';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'blob';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'blob';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en'] = '';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['text'] = 'rss_optional_1';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = 'rssoptional1';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en'] = '';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['text'] = 'rss_optional_2';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = 'rssoptional2';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en'] = '';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['text'] = 'rss_optional_3';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = 'rssoptional3';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en'] = '';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['text'] = 'rss_optional_4';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = 'rssoptional4';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en'] = '';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['text'] = 'rss_optional_5';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = 'rssoptional5';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en'] = '';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['text'] = 'rss_add_date';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = 'rssadddate';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en'] = '';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['text'] = 'rss_add_user';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = 'rssadduser';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en'] = '';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['text'] = 'rss_del_date';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = 'rssdeldate';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en'] = '';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['text'] = 'rss_del_user';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = 'rssdeluser';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en'] = '';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['text'] = 'rss_order';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = 'rssorder';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'numeric';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en'] = '';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['text'] = 'rss_content';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = 'rsscontent';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en'] = '';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['text'] = 'rss_group';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = 'rssgroup';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en'] = '';
|
||||
|
||||
$y = 1; //table array index
|
||||
$z = 0; //field array index
|
||||
$apps[$x]['db'][$y]['table'] = 'v_rss_sub';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['text'] = 'id';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'][] = 'rsssubid';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'][] = 'rss_sub_id';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'serial';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'integer';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'INT NOT NULL AUTO_INCREMENT';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en'] = '';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['deprecated'] = 'true';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'rss_sub_uuid';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'uuid';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'char(36)';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['key']['type'] = 'primary';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en'] = '';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'domain_uuid';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'uuid';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'char(36)';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['key']['type'] = 'foreign';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['table'] = 'v_domains';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['field'] = 'domain_uuid';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en'] = '';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'v_id';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en'] = '';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['deprecated'] = 'true';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['text'] = 'rss_id';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = 'rssid';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'numeric';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en'] = '';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['deprecated'] = 'true';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'rss_uuid';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'uuid';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'char(36)';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['key']['type'] = 'foreign';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['table'] = 'v_rss';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['field'] = 'rss_uuid';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en'] = '';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['text'] = 'rss_sub_language';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = 'rsssublanguage';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en'] = '';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['text'] = 'rss_sub_title';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = 'rsssubtitle';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en'] = '';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['text'] = 'rss_sub_link';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = 'rsssublink';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en'] = '';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['text'] = 'rss_sub_description';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = 'rsssubdesc';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en'] = '';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['text'] = 'rss_sub_optional_1';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = 'rsssuboptional1';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en'] = '';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['text'] = 'rss_sub_optional_2';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = 'rsssuboptional2';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en'] = '';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['text'] = 'rss_sub_optional_3';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = 'rsssuboptional3';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en'] = '';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['text'] = 'rss_sub_optional_4';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = 'rsssuboptional4';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en'] = '';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['text'] = 'rss_sub_optional_5';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = 'rsssuboptional5';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en'] = '';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['text'] = 'rss_sub_add_date';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = 'rsssubadddate';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en'] = '';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['text'] = 'rss_sub_add_user';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = 'rsssubadduser';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en'] = '';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['text'] = 'rss_sub_del_user';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = 'rsssubdeluser';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en'] = '';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['text'] = 'rss_sub_del_date';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = 'rsssubdeldate';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en'] = '';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['text'] = 'rss_sub_parent_id';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = 'rsssubparentid';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en'] = '';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['deprecated'] = 'true';
|
||||
|
||||
$y = 2; //table array index
|
||||
$z = 0; //field array index
|
||||
$apps[$x]['db'][$y]['table'] = 'v_rss_sub_category';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['text'] = 'id';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'][] = 'rsssubcategoryid';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'][] = 'rss_sub_category_id';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'serial';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'integer';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'INT NOT NULL AUTO_INCREMENT';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en'] = '';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['deprecated'] = 'true';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'rss_sub_category_uuid';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'uuid';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'char(36)';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['key']['type'] = 'primary';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en'] = '';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'domain_uuid';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'uuid';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'char(36)';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['key']['type'] = 'foreign';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['table'] = 'v_domains';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['field'] = 'domain_uuid';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en'] = '';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'v_id';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en'] = '';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['deprecated'] = 'true';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['text'] = 'rss_sub_category_language';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = 'rsssubcategorylanguage';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en'] = '';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['text'] = 'rss_category';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = 'rsscategory';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en'] = '';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['text'] = 'rss_sub_category';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = 'rsssubcategory';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en'] = '';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['text'] = 'rss_sub_category_description';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = 'rsssubcategorydesc';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en'] = '';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['text'] = 'rss_sub_add_user';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = 'rssadduser';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en'] = '';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['text'] = 'rss_sub_add_date';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = 'rssadddate';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en'] = '';
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,32 @@
|
||||
<?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>
|
||||
*/
|
||||
|
||||
$module_title = 'Content';
|
||||
$rss_category = 'content';
|
||||
|
||||
$rss_sub_show = 0; //1 = yes, 0 = no
|
||||
$rss_sub_title = 'Content';
|
||||
?>
|
||||
@@ -0,0 +1,50 @@
|
||||
<?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>
|
||||
*/
|
||||
return; //disable
|
||||
|
||||
include "root.php";
|
||||
require_once "includes/require.php";
|
||||
require_once "includes/checkauth.php";
|
||||
if (permission_exists('content_view')) {
|
||||
//access granted
|
||||
}
|
||||
else {
|
||||
echo "access denied";
|
||||
exit;
|
||||
}
|
||||
|
||||
require_once "config.php";
|
||||
session_start();
|
||||
|
||||
require_once "includes/header.php";
|
||||
echo "<link rel=\"alternate\" type=\"application/rss+xml\" title=\"\" href=\"rss.php\" />\n";
|
||||
|
||||
$_GET["c"] = "html";
|
||||
require_once "rss.php";
|
||||
require_once "includes/footer.php";
|
||||
|
||||
return;
|
||||
?>
|
||||
@@ -0,0 +1,50 @@
|
||||
<?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>
|
||||
*/
|
||||
|
||||
// make sure the PATH_SEPARATOR is defined
|
||||
if (!defined("PATH_SEPARATOR")) {
|
||||
if ( strpos( $_ENV[ "OS" ], "Win" ) !== false ) { define("PATH_SEPARATOR", ";"); } else { define("PATH_SEPARATOR", ":"); }
|
||||
}
|
||||
|
||||
// make sure the document_root is set
|
||||
$_SERVER["SCRIPT_FILENAME"] = str_replace("\\", "/", $_SERVER["SCRIPT_FILENAME"]);
|
||||
$_SERVER["DOCUMENT_ROOT"] = str_replace($_SERVER["PHP_SELF"], "", $_SERVER["SCRIPT_FILENAME"]);
|
||||
$_SERVER["DOCUMENT_ROOT"] = realpath($_SERVER["DOCUMENT_ROOT"]);
|
||||
//echo "DOCUMENT_ROOT: ".$_SERVER["DOCUMENT_ROOT"]."<br />\n";
|
||||
//echo "PHP_SELF: ".$_SERVER["PHP_SELF"]."<br />\n";
|
||||
//echo "SCRIPT_FILENAME: ".$_SERVER["SCRIPT_FILENAME"]."<br />\n";
|
||||
|
||||
// if the project directory exists then add it to the include path otherwise add the document root to the include path
|
||||
if (is_dir($_SERVER["DOCUMENT_ROOT"].'/fusionpbx')){
|
||||
if(!defined('PROJECT_PATH')) { define('PROJECT_PATH', '/fusionpbx'); }
|
||||
set_include_path( get_include_path() . PATH_SEPARATOR . $_SERVER["DOCUMENT_ROOT"].'/fusionpbx' );
|
||||
}
|
||||
else {
|
||||
if(!defined('PROJECT_PATH')) { define('PROJECT_PATH', ''); }
|
||||
set_include_path( get_include_path() . PATH_SEPARATOR . $_SERVER['DOCUMENT_ROOT'] );
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,44 @@
|
||||
rss {
|
||||
display: block;
|
||||
font-family: verdana, arial;
|
||||
}
|
||||
|
||||
title {
|
||||
display: block;
|
||||
margin: 5px;
|
||||
padding: 2px;
|
||||
color: #77A3EF;
|
||||
border-bottom: 1px solid #77A3EF;
|
||||
}
|
||||
|
||||
link {
|
||||
display: block;
|
||||
font-size: small;
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
description {
|
||||
display: block;
|
||||
font-size: small;
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
item {
|
||||
display: block;
|
||||
padding: 2px 30px 2px 30px;
|
||||
}
|
||||
|
||||
description {
|
||||
display: block;
|
||||
background-color: #FCFCFC;
|
||||
margin: 20px;
|
||||
text-align: left;
|
||||
padding: 5px;
|
||||
color: #7f7f7f;
|
||||
border: 1px solid #EEEEEE;
|
||||
}
|
||||
|
||||
/* all hidden elements */
|
||||
language, lastBuildDate, ttl, guid, category, pubDate, copyright, webmaster, comments {
|
||||
display: none;
|
||||
}
|
||||
@@ -0,0 +1,244 @@
|
||||
<?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>
|
||||
*/
|
||||
return; //disable
|
||||
include "root.php";
|
||||
require_once "includes/require.php";
|
||||
require_once "includes/checkauth.php";
|
||||
require_once "config.php";
|
||||
if (permission_exists('content_view')) {
|
||||
//access granted
|
||||
}
|
||||
else {
|
||||
echo "access denied";
|
||||
exit;
|
||||
}
|
||||
|
||||
//include module specific information
|
||||
if (strlen($mod_config_path)==0) {
|
||||
include "config.php";
|
||||
}
|
||||
else {
|
||||
//$mod_config_path = "/news"; //examples
|
||||
//$mod_config_path = "/app/news"; //examples
|
||||
include $mod_config_path.'/config.php';
|
||||
}
|
||||
|
||||
$rss_css_url = 'http://'.$_SERVER["HTTP_HOST"].$_SERVER["PHP_SELF"];
|
||||
$rss_css_url = str_replace ("rss.php", "rss.css", $rss_css_url);
|
||||
$content_type = $_GET["c"];
|
||||
//echo "contenttype $content_type";
|
||||
if (strlen($_GET["rss_category"]) > 0) {
|
||||
$rss_category = $_GET["rss_category"];
|
||||
}
|
||||
if (strlen($content_type) == 0) {
|
||||
$content_type = "rss"; //define default contenttype
|
||||
}
|
||||
if ($content_type == "html") {
|
||||
session_start();
|
||||
}
|
||||
//echo $rss_css_url;
|
||||
//exit;
|
||||
|
||||
if ($content_type == "rss") {
|
||||
header('Content-Type: text/xml');
|
||||
echo '<?xml version="1.0" ?'.'>';
|
||||
echo '<?xml-stylesheet type="text/css" href="'.$rss_css_url.'" ?'.'>';
|
||||
//echo '<?xml-stylesheet type="text/css" href="http://'.$_SERVER["HTTP_HOST"].$_SERVER["PHP_SELF"].'" ?'.'>';
|
||||
//echo "\n";
|
||||
echo "<rss version=\"2.0\">\n";
|
||||
echo "<channel>\n";
|
||||
|
||||
echo "<title>$module_title RSS Feed</title>\n";
|
||||
//echo "<link>http://www.xul.fr/</link>\n";
|
||||
echo "<description>Task List for RSS...</description>\n";
|
||||
echo "<language>en-US</language>\n";
|
||||
//echo "<copyright></copyright>\n";
|
||||
//echo "<image>\n";
|
||||
//echo " <url>http://www.xul.fr/xul-icon.gif</url>\n";
|
||||
//echo " <link>http://www.xul.fr/index.html</link>\n";
|
||||
//echo "</image>";
|
||||
}
|
||||
|
||||
$sql = "";
|
||||
$sql .= "select * from v_rss ";
|
||||
$sql .= "where rss_category = '$rss_category' ";
|
||||
$sql .= "and length(rss_del_date) = 0 ";
|
||||
$sql .= "or rss_category = '$rss_category' ";
|
||||
$sql .= "and rss_del_date is null ";
|
||||
$sql .= "order by rss_uuid asc ";
|
||||
$prep_statement = $db->prepare(check_sql($sql));
|
||||
$prep_statement->execute();
|
||||
|
||||
$last_cat = "";
|
||||
$count = 0;
|
||||
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||
foreach ($result as &$row) {
|
||||
|
||||
$rss_uuid = $row["rss_uuid"];
|
||||
$rss_title = $row["rss_title"];
|
||||
$rss_description = $row["rss_description"];
|
||||
$rss_link = $row["rss_link"];
|
||||
|
||||
//$rss_description = $row[rss_sub_description];
|
||||
//$rss_description = str_replace ("\r\n", "<br>", $rss_description);
|
||||
//$rss_description = str_replace ("\n", "<br>", $rss_description);
|
||||
|
||||
if ($content_type == "rss") {
|
||||
$rss_title = htmlentities($rss_title);
|
||||
$rss_description = htmlentities($rss_description);
|
||||
|
||||
echo "<item>\n";
|
||||
echo "<title>".$rss_title."</title>\n";
|
||||
echo "<description>".$rss_description."</description>\n";
|
||||
echo "<link>".$rss_link."</link>\n";
|
||||
//echo "<pubDate>12 Mar 2007 19:38:06 GMT</pubDate>\n";
|
||||
//echo "<guid isPermaLink='true'>http://www.google.com/log/123</guid>\n";
|
||||
//echo "<comments>http://www.google.com/log/121#comments</comments>\n";
|
||||
//echo "<category>Web Design</category>";
|
||||
echo "</item>\n";
|
||||
echo "\n";
|
||||
|
||||
}
|
||||
else {
|
||||
if (strlen($rss_link) > 0) {
|
||||
echo "<b><a href='$rss_link'>".$rss_title."</a></b><br>\n";
|
||||
}
|
||||
else {
|
||||
echo "<b>".$rss_title."</b><br>\n";
|
||||
}
|
||||
echo "".$rss_description."\n";
|
||||
echo "<br><br>";
|
||||
|
||||
if ($rss_sub_show == 1) {
|
||||
//--- Begin Sub List -------------------------------------------------------
|
||||
|
||||
echo "<br><br><br>";
|
||||
echo "<b>$rss_sub_title</b><br>";
|
||||
|
||||
$sql = "";
|
||||
$sql .= "select * from v_rss_sub ";
|
||||
$sql .= "where rss_uuid = '$rss_uuid' ";
|
||||
$sql .= "and length(rss_sub_del_date) = 0 ";
|
||||
$sql .= "or rss_uuid = '$rss_uuid' ";
|
||||
$sql .= "and rss_sub_del_date is null ";
|
||||
|
||||
if (strlen($order_by)> 0) { $sql .= "order by $order_by $order "; }
|
||||
|
||||
$prep_statement_2 = $db->prepare($sql);
|
||||
$prep_statement_2->execute();
|
||||
$result2 = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||
$result_count2 = count($result2);
|
||||
|
||||
$c2 = 0;
|
||||
$row_style["0"] = "background-color: #F5F5DC;";
|
||||
$row_style["1"] = "background-color: #FFFFFF;";
|
||||
|
||||
echo "<div align='left'>\n";
|
||||
//echo " <b>Notes</b>";
|
||||
echo "<table width='75%' border='1' 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>";
|
||||
if ($result_count == 0) { //no results
|
||||
echo "<tr><td> </td></tr>";
|
||||
}
|
||||
else {
|
||||
echo "<tr><td colspan='100%'><img src='/images/spacer.gif' width='100%' height='1' style='background-color: #BBBBBB;'></td></tr>\n";
|
||||
|
||||
foreach($result2 as $row2) {
|
||||
echo "<tr style='".$row_style[$c]."'>\n";
|
||||
//echo "<td valign='top'>".$rss_uuid."</td>";
|
||||
//echo "<td valign='top'> <b>".$row2[rss_sub_title]."</b> </td>";
|
||||
//echo "<td valign='top'> ".$row2[rss_sub_link]." </td>";
|
||||
echo "<td valign='top' width='200'>";
|
||||
echo " <b>".$row2[rss_sub_title]."</b>";
|
||||
echo "</td>";
|
||||
|
||||
echo "<td valign='top'>".$row2[rss_sub_add_date]."</td>";
|
||||
|
||||
//echo "<td valign='top'>".$row2[rss_sub_optional_1]."</td>";
|
||||
//echo "<td valign='top'>".$row2[rss_sub_optional_2]."</td>";
|
||||
//echo "<td valign='top'>".$row2[rss_sub_optional_3]."</td>";
|
||||
//echo "<td valign='top'>".$row2[rss_sub_optional_4]."</td>";
|
||||
//echo "<td valign='top'>".$row2[rss_sub_optional_5]."</td>";
|
||||
//echo "<td valign='top'>".$row2[rss_sub_add_user]."</td>";
|
||||
echo "<td valign='top' align='right'>";
|
||||
echo " ";
|
||||
//echo " <input type='button' class='btn' name='' onclick=\"window.location='rsssubupdate.php?rss_uuid=".$rss_uuid."&rss_sub_uuid=".$row2[rss_sub_uuid]."'\" value='Update'>";
|
||||
echo " \n";
|
||||
//echo " <a href='rsssubupdate.php?rss_uuid=".$rss_uuid."&rss_sub_uuid=".$row2[rss_sub_uuid]."'>Update</a> ";
|
||||
echo "</td>";
|
||||
|
||||
$rss_sub_description = $row2[rss_sub_description];
|
||||
//$rss_sub_description = str_replace ("\r\n", "<br>", $rss_sub_description);
|
||||
//$rss_sub_description = str_replace ("\n", "<br>", $rss_sub_description);
|
||||
|
||||
|
||||
echo "</tr>";
|
||||
echo "<tr style='".$row_style[$c]."'>\n";
|
||||
echo "<td valign='top' width='300' colspan='3'>";
|
||||
echo "".$rss_sub_description." ";
|
||||
echo "</td>";
|
||||
|
||||
echo "</tr>";
|
||||
|
||||
echo "<tr><td colspan='100%'><img src='/images/spacer.gif' width='100%' height='1' style='background-color: #BBBBBB;'></td></tr>\n";
|
||||
if ($c2==0) { $c2=1; } else { $c2=0; }
|
||||
} //end foreach
|
||||
unset($sql, $result, $row_count);
|
||||
|
||||
echo "</table>\n";
|
||||
echo "</div>\n";
|
||||
|
||||
|
||||
echo " <br><br>";
|
||||
echo " </td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
} //end if results
|
||||
|
||||
echo "</table>\n";
|
||||
//--- End Sub List -------------------------------------------------------
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//echo "<item>\n";
|
||||
//echo "<title> ".$row["favname"]."</title>\n";
|
||||
//echo "<description>".$row["favdesc"]."</description>\n";
|
||||
//echo "<link>".$row["favurl"]."</link>\n";
|
||||
//echo "</item>\n";
|
||||
|
||||
//$last_cat = $row["favcat"];
|
||||
$count++;
|
||||
|
||||
}
|
||||
|
||||
if ($content_type == "rss") {
|
||||
echo "</channel>\n";
|
||||
echo "\n";
|
||||
echo "</rss>\n";
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,347 @@
|
||||
<?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>
|
||||
*/
|
||||
include "root.php";
|
||||
require_once "includes/require.php";
|
||||
require_once "includes/checkauth.php";
|
||||
require_once "config.php";
|
||||
if (permission_exists('content_add')) {
|
||||
//access granted
|
||||
}
|
||||
else {
|
||||
echo "access denied";
|
||||
exit;
|
||||
}
|
||||
|
||||
if (count($_POST)>0) {
|
||||
|
||||
//get the http values and set them as variables
|
||||
$rss_sub_category = check_str($_POST["rss_sub_category"]);
|
||||
$rss_title = check_str($_POST["rss_title"]);
|
||||
$rss_link = check_str($_POST["rss_link"]);
|
||||
$rss_description = check_str($_POST["rss_description"]);
|
||||
$rss_img = check_str($_POST["rss_img"]);
|
||||
$rss_optional_1 = check_str($_POST["rss_optional_1"]);
|
||||
$rss_optional_2 = check_str($_POST["rss_optional_2"]);
|
||||
$rss_optional_3 = check_str($_POST["rss_optional_3"]);
|
||||
$rss_optional_4 = check_str($_POST["rss_optional_4"]);
|
||||
$rss_optional_5 = check_str($_POST["rss_optional_5"]);
|
||||
$rss_group = check_str($_POST["rss_group"]);
|
||||
$rss_order = check_str($_POST["rss_order"]);
|
||||
|
||||
//insert the data into the database
|
||||
$rss_uuid = uuid();
|
||||
$sql = "insert into v_rss ";
|
||||
$sql .= "(";
|
||||
$sql .= "domain_uuid, ";
|
||||
$sql .= "rss_uuid, ";
|
||||
$sql .= "rss_category, ";
|
||||
$sql .= "rss_sub_category, ";
|
||||
$sql .= "rss_title, ";
|
||||
$sql .= "rss_link, ";
|
||||
$sql .= "rss_description, ";
|
||||
$sql .= "rss_img, ";
|
||||
$sql .= "rss_optional_1, ";
|
||||
$sql .= "rss_optional_2, ";
|
||||
$sql .= "rss_optional_3, ";
|
||||
$sql .= "rss_optional_4, ";
|
||||
$sql .= "rss_optional_5, ";
|
||||
$sql .= "rss_group, ";
|
||||
$sql .= "rss_order, ";
|
||||
$sql .= "rss_add_date, ";
|
||||
$sql .= "rss_add_user ";
|
||||
$sql .= ")";
|
||||
$sql .= "values ";
|
||||
$sql .= "(";
|
||||
$sql .= "'$domain_uuid', ";
|
||||
$sql .= "'$rss_uuid', ";
|
||||
$sql .= "'$rss_category', ";
|
||||
$sql .= "'$rss_sub_category', ";
|
||||
$sql .= "'$rss_title', ";
|
||||
$sql .= "'$rss_link', ";
|
||||
$sql .= "'$rss_description', ";
|
||||
$sql .= "'$rss_img', ";
|
||||
$sql .= "'$rss_optional_1', ";
|
||||
$sql .= "'$rss_optional_2', ";
|
||||
$sql .= "'$rss_optional_3', ";
|
||||
$sql .= "'$rss_optional_4', ";
|
||||
$sql .= "'$rss_optional_5', ";
|
||||
$sql .= "'$rss_group', ";
|
||||
$sql .= "'$rss_order', ";
|
||||
$sql .= "now(), ";
|
||||
$sql .= "'".$_SESSION["username"]."' ";
|
||||
$sql .= ")";
|
||||
$db->exec(check_sql($sql));
|
||||
unset($sql);
|
||||
|
||||
require_once "includes/header.php";
|
||||
echo "<meta http-equiv=\"refresh\" content=\"2;url=rsslist.php\">\n";
|
||||
echo "<div align='center'>";
|
||||
echo "Add Complete";
|
||||
echo "</div>";
|
||||
require_once "includes/footer.php";
|
||||
return;
|
||||
}
|
||||
|
||||
require_once "includes/header.php";
|
||||
if (is_dir($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/includes/tiny_mce')) {
|
||||
if ($rss_optional_1 == "text/html") {
|
||||
require_once "includes/wysiwyg.php";
|
||||
}
|
||||
}
|
||||
else {
|
||||
//--- Begin: Edit Area -----------------------------------------------------
|
||||
echo " <script language=\"javascript\" type=\"text/javascript\" src=\"".PROJECT_PATH."/includes/edit_area/edit_area_full.js\"></script>\n";
|
||||
echo " <!-- -->\n";
|
||||
|
||||
echo " <script language=\"Javascript\" type=\"text/javascript\">\n";
|
||||
echo " editAreaLoader.init({\n";
|
||||
echo " id: \"rss_description\" // id of the textarea to transform //, |, help\n";
|
||||
echo " ,start_highlight: true\n";
|
||||
echo " ,font_size: \"8\"\n";
|
||||
echo " ,allow_toggle: false\n";
|
||||
echo " ,language: \"en\"\n";
|
||||
echo " ,syntax: \"html\"\n";
|
||||
echo " ,toolbar: \"search, go_to_line,|, fullscreen, |, undo, redo, |, select_font, |, syntax_selection, |, change_smooth_selection, highlight, reset_highlight, |, help\" //new_document,\n";
|
||||
echo " ,plugins: \"charmap\"\n";
|
||||
echo " ,charmap_default: \"arrows\"\n";
|
||||
echo " });\n";
|
||||
echo " </script>";
|
||||
//--- End: Edit Area -------------------------------------------------------
|
||||
}
|
||||
|
||||
echo "<div align='center'>";
|
||||
echo "<table border='0' width='100%' cellpadding='0' cellspacing='2'>\n";
|
||||
echo "<tr class='border'>\n";
|
||||
echo " <td align=\"left\" width='100%'>\n";
|
||||
|
||||
echo "<form method='post' action=''>";
|
||||
echo "<table width='100%' cellpadding='6' cellspacing='0'>";
|
||||
|
||||
echo "<tr>\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 "</tr>\n";
|
||||
//echo " <tr>";
|
||||
//echo " <td class='vncellreq'>Category:</td>";
|
||||
//echo " <td class='vtable'><input type='text' class='formfld' name='rss_category' value='$rss_category'></td>";
|
||||
//echo " </tr>";
|
||||
//echo " <tr>";
|
||||
//echo " <td class='vncellreq' nowrap>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 " <td width='30%' class='vncellreq' nowrap>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 " <td class='vncellreq'>Link:</td>";
|
||||
echo " <td class='vtable'><input type='text' class='formfld' name='rss_link' value='$rss_link'></td>";
|
||||
echo " </tr>";
|
||||
|
||||
echo " <tr>";
|
||||
echo " <td class='vncellreq'>Group:</td>";
|
||||
echo " <td class='vtable'>";
|
||||
//echo " <input type='text' class='formfld' name='menuparentid' value='$menuparentid'>";
|
||||
|
||||
//---- Begin Select List --------------------
|
||||
$sql = "SELECT * FROM v_groups ";
|
||||
$sql .= "where domain_uuid = '$domain_uuid' ";
|
||||
$prep_statement = $db->prepare(check_sql($sql));
|
||||
$prep_statement->execute();
|
||||
|
||||
echo "<select name=\"rss_group\" class='formfld'>\n";
|
||||
echo "<option value=\"\">public</option>\n";
|
||||
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||
//$count = count($result);
|
||||
foreach($result as $field) {
|
||||
if ($rss_group == $field[group_name]) {
|
||||
echo "<option value='".$field[group_name]."' selected>".$field[group_name]."</option>\n";
|
||||
}
|
||||
else {
|
||||
echo "<option value='".$field[group_name]."'>".$field[group_name]."</option>\n";
|
||||
}
|
||||
}
|
||||
|
||||
echo "</select>";
|
||||
unset($sql, $result);
|
||||
//---- End Select List --------------------
|
||||
|
||||
echo " </td>";
|
||||
echo " </tr>";
|
||||
|
||||
/*
|
||||
echo " <tr>\n";
|
||||
echo " <td width='20%' class=\"vncell\" style='text-align: left;'>\n";
|
||||
echo " Template: \n";
|
||||
echo " </td>\n";
|
||||
echo " <td class=\"vtable\">\n";
|
||||
echo "<select id='rss_sub_category' name='rss_sub_category' class='formfld' style=''>\n";
|
||||
echo "<option value=''></option>\n";
|
||||
$theme_dir = $_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/themes';
|
||||
if ($handle = opendir($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/themes')) {
|
||||
while (false !== ($file = readdir($handle))) {
|
||||
if ($file != "." && $file != ".." && $file != ".svn" && is_dir($theme_dir.'/'.$file)) {
|
||||
if ($file == $rss_sub_category) {
|
||||
echo "<option value='$file' selected='selected'>$file</option>\n";
|
||||
}
|
||||
else {
|
||||
echo "<option value='$file'>$file</option>\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
closedir($handle);
|
||||
}
|
||||
echo " </select>\n";
|
||||
echo " <br />\n";
|
||||
echo " Select a template to set as the default and then press save.<br />\n";
|
||||
echo " </td>\n";
|
||||
echo " </tr>\n";
|
||||
*/
|
||||
|
||||
echo " <tr>";
|
||||
echo " <td class='vncellreq'>Type:</td>";
|
||||
echo " <td class='vtable'>";
|
||||
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"; }
|
||||
else { echo "<option value=\"text/html\">text/html</option>\n"; }
|
||||
|
||||
if ($rss_optional_1 == "text/javascript") { echo "<option value=\"text/javascript\" selected>text/javascript</option>\n"; }
|
||||
else { echo "<option value=\"text/javascript\">text/javascript</option>\n"; }
|
||||
echo " </select>";
|
||||
echo " </td>";
|
||||
echo " </tr>";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " Order:\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <select name='rss_order' class='formfld'>\n";
|
||||
if (strlen(htmlspecialchars($rss_order))> 0) {
|
||||
echo " <option selected='yes' value='".htmlspecialchars($rss_order)."'>".htmlspecialchars($rss_order)."</option>\n";
|
||||
}
|
||||
$i=0;
|
||||
while($i<=999) {
|
||||
if (strlen($i) == 1) {
|
||||
echo " <option value='00$i'>00$i</option>\n";
|
||||
}
|
||||
if (strlen($i) == 2) {
|
||||
echo " <option value='0$i'>0$i</option>\n";
|
||||
}
|
||||
if (strlen($i) == 3) {
|
||||
echo " <option value='$i'>$i</option>\n";
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
echo " </select>\n";
|
||||
echo "<br />\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo " <tr>";
|
||||
//echo " <td class='vncellreq' valign='top'></td>";
|
||||
echo " <td class='' colspan='2' align='left'>";
|
||||
echo " <strong>Content:</strong> ";
|
||||
if (is_dir($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/includes/tiny_mce')) {
|
||||
echo " editor <a href='#' title='toggle' onclick=\"toogleEditorMode('rss_description'); return false;\">on/off</a><br>";
|
||||
}
|
||||
else {
|
||||
echo " <textarea name='rss_description' id='rss_description' class='formfld' cols='20' style='width: 100%' rows='12' ></textarea>";
|
||||
}
|
||||
echo " </td>";
|
||||
echo " </tr>";
|
||||
//echo " <tr>";
|
||||
//echo " <td class='vncellreq'>Image:</td>";
|
||||
//echo " <td class='vtable'><input type='text' name='rss_img' value='$rss_img'></td>";
|
||||
//echo " </tr>";
|
||||
//echo " <tr>";
|
||||
//echo " <td class='vncellreq'>Priority:</td>";
|
||||
//echo " <td class='vtable'>";
|
||||
//echo " <input type='text' name='rss_optional_1' value='$rss_optional_1'>";
|
||||
//echo " <select name=\"rss_optional_1\" class='formfld'>\n";
|
||||
//echo " <option value=\"$rss_optional_1\">$rss_optional_1</option>\n";
|
||||
//echo " <option value=\"\"></option>\n";
|
||||
//echo " <option value=\"low\">low</option>\n";
|
||||
//echo " <option value=\"med\">med</option>\n";
|
||||
//echo " <option value=\"high\">high</option>\n";
|
||||
//echo " </select>";
|
||||
//echo " </td>";
|
||||
//echo " </tr>";
|
||||
//echo " <tr>";
|
||||
//echo " <td class='vncellreq'>Status:</td>";
|
||||
//echo " <td class='vtable'>";
|
||||
//echo " <input type='text' name='rss_optional_2' value='$rss_optional_2'>";
|
||||
//echo " <select name=\"rss_optional_2\" class=\"formfld\">\n";
|
||||
//echo " <option value=\"$rss_optional_2\">$rss_optional_2</option>\n";
|
||||
//echo " <option value=\"\"></option>\n";
|
||||
//echo " <option value=\"0\">0</option>\n";
|
||||
//echo " <option value=\"10\">10</option>\n";
|
||||
//echo " <option value=\"20\">20</option>\n";
|
||||
//echo " <option value=\"30\">30</option>\n";
|
||||
//echo " <option value=\"40\">40</option>\n";
|
||||
//echo " <option value=\"50\">50</option>\n";
|
||||
//echo " <option value=\"60\">60</option>\n";
|
||||
//echo " <option value=\"70\">70</option>\n";
|
||||
//echo " <option value=\"80\">80</option>\n";
|
||||
//echo " <option value=\"90\">90</option>\n";
|
||||
//echo " <option value=\"100\">100</option>\n";
|
||||
//echo " </select>";
|
||||
//echo " </td>";
|
||||
//echo " </tr>";
|
||||
//echo " <tr>";
|
||||
//echo " <td class='vncellreq'>Optional 3:</td>";
|
||||
//echo " <td class='vtable'><input type='text' class='formfld' name='rss_optional_3' value='$rss_optional_3'></td>";
|
||||
//echo " </tr>";
|
||||
//echo " <tr>";
|
||||
//echo " <td class='vncellreq'>Optional 4:</td>";
|
||||
//echo " <td class='vtable'><input type='text' class='formfld' name='rss_optional_4' value='$rss_optional_4'></td>";
|
||||
//echo " </tr>";
|
||||
//echo " <tr>";
|
||||
//echo " <td class='vncellreq'>rss_optional_5:</td>";
|
||||
//echo " <td class='vtable'><input type='text' class='formfld' name='rss_optional_5' value='$rss_optional_5'></td>";
|
||||
//echo " </tr>";
|
||||
//echo " <tr>";
|
||||
//echo " <td class='vncellreq'>rss_add_date:</td>";
|
||||
//echo " <td class='vtable'><input type='text' class='formfld' name='rss_add_date' value='$rss_add_date'></td>";
|
||||
//echo " </tr>";
|
||||
|
||||
echo " <tr>";
|
||||
echo " <td class='' colspan='2' align='right'>";
|
||||
echo " <input type='submit' class='btn' name='submit' value='Add $module_title'>\n";
|
||||
echo " </td>";
|
||||
echo " </tr>";
|
||||
echo "</table>";
|
||||
echo "</form>";
|
||||
|
||||
|
||||
echo " </td>";
|
||||
echo " </tr>";
|
||||
echo "</table>";
|
||||
echo "</div>";
|
||||
|
||||
|
||||
require_once "includes/footer.php";
|
||||
?>
|
||||
@@ -0,0 +1,74 @@
|
||||
<?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>
|
||||
*/
|
||||
include "root.php";
|
||||
require_once "includes/require.php";
|
||||
require_once "includes/checkauth.php";
|
||||
require_once "config.php";
|
||||
if (permission_exists('content_view')) {
|
||||
//access granted
|
||||
}
|
||||
else {
|
||||
echo "access denied";
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
//get data from the db
|
||||
$rss_uuid = $_REQUEST["rss_uuid"];
|
||||
|
||||
$sql = "";
|
||||
$sql .= "select * from v_rss ";
|
||||
$sql .= "where domain_uuid = '$domain_uuid' ";
|
||||
$sql .= "and rss_uuid = '$rss_uuid' ";
|
||||
//echo $sql;
|
||||
$prep_statement = $db->prepare(check_sql($sql));
|
||||
$prep_statement->execute();
|
||||
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||
foreach ($result as &$row) {
|
||||
$rss_category = $row["rss_category"];
|
||||
$rss_sub_category = $row["rss_sub_category"];
|
||||
$rss_title = $row["rss_title"];
|
||||
$rss_link = $row["rss_link"];
|
||||
$rss_description = $row["rss_description"];
|
||||
$rss_img = $row["rss_img"];
|
||||
$rss_optional_1 = $row["rss_optional_1"];
|
||||
$rss_optional_2 = $row["rss_optional_2"];
|
||||
$rss_optional_3 = $row["rss_optional_3"];
|
||||
$rss_optional_4 = $row["rss_optional_4"];
|
||||
$rss_optional_5 = $row["rss_optional_5"];
|
||||
$rss_add_date = $row["rss_add_date"];
|
||||
$rss_add_user = $row["rss_add_user"];
|
||||
$rss_group = $row["rss_group"];
|
||||
$rss_order = $row["rss_order"];
|
||||
//$rss_description = str_replace ("\r\n", "<br>", $rss_description);
|
||||
|
||||
echo $rss_description;
|
||||
//return;
|
||||
|
||||
break; //limit to 1 row
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,62 @@
|
||||
<?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>
|
||||
*/
|
||||
include "root.php";
|
||||
require_once "includes/require.php";
|
||||
require_once "includes/checkauth.php";
|
||||
require_once "config.php";
|
||||
if (permission_exists('content_delete')) {
|
||||
//access granted
|
||||
}
|
||||
else {
|
||||
echo "access denied";
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
if (count($_GET)>0) {
|
||||
$rss_uuid = check_str($_GET["rss_uuid"]);
|
||||
|
||||
//mark the the item as deleted and who deleted it
|
||||
$sql = "update v_rss set ";
|
||||
$sql .= "rss_del_date = now(), ";
|
||||
$sql .= "rss_del_user = '".$_SESSION["username"]."' ";
|
||||
$sql .= "where domain_uuid = '$domain_uuid' ";
|
||||
$sql .= "and rss_uuid = '$rss_uuid' ";
|
||||
$sql .= "and rss_category = '$rss_category' ";
|
||||
$db->exec(check_sql($sql));
|
||||
unset($sql);
|
||||
|
||||
require_once "includes/header.php";
|
||||
echo "<meta http-equiv=\"refresh\" content=\"2;url=rsslist.php?rss_uuid=$rss_uuid\">\n";
|
||||
echo "<div align='center'>";
|
||||
echo "Delete Completed";
|
||||
echo "</div>";
|
||||
require_once "includes/footer.php";
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,217 @@
|
||||
<?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>
|
||||
*/
|
||||
include "root.php";
|
||||
require_once "includes/require.php";
|
||||
require_once "includes/checkauth.php";
|
||||
require_once "config.php";
|
||||
if (permission_exists('content_view')) {
|
||||
//access granted
|
||||
}
|
||||
else {
|
||||
echo "access denied";
|
||||
exit;
|
||||
}
|
||||
|
||||
if (!function_exists('th_order_by')) {
|
||||
//html table header order by
|
||||
function th_order_by($field_name, $columntitle, $order_by, $order) {
|
||||
|
||||
$html .= "<th nowrap> ";
|
||||
if (strlen($order_by)==0) {
|
||||
$html .= "<a href='?order_by=$field_name&order=desc' title='ascending'>$columntitle</a>";
|
||||
}
|
||||
else {
|
||||
if ($order=="asc") {
|
||||
$html .= "<a href='?order_by=$field_name&order=desc' title='ascending'>$columntitle</a>";
|
||||
}
|
||||
else {
|
||||
$html .= "<a href='?order_by=$field_name&order=asc' title='descending'>$columntitle</a>";
|
||||
}
|
||||
}
|
||||
$html .= " </th>";
|
||||
|
||||
return $html;
|
||||
}
|
||||
}
|
||||
|
||||
require_once "includes/header.php";
|
||||
echo "<link rel=\"alternate\" type=\"application/rss+xml\" title=\"\" href=\"rss.php\" />\n";
|
||||
|
||||
$order_by = $_GET["order_by"];
|
||||
$order = $_GET["order"];
|
||||
|
||||
|
||||
echo "<div align='center'>";
|
||||
echo "<table border='0' width='100%' cellpadding='0' cellspacing='2'>\n";
|
||||
echo "<tr class='border'>\n";
|
||||
echo " <td align=\"left\">\n";
|
||||
|
||||
echo "<table width='100%'>";
|
||||
echo "<tr>";
|
||||
echo "<td align='left'>";
|
||||
echo " <b>$module_title List</b>";
|
||||
echo "</td>";
|
||||
echo "<td align='right'>";
|
||||
//echo " <input type='button' class='btn' name='' onclick=\"window.location='rssadd.php'\" value='Add $module_title'> \n";
|
||||
echo "</td>";
|
||||
echo "</tr>";
|
||||
echo "</table>";
|
||||
|
||||
$sql = "";
|
||||
$sql .= "select * from v_rss ";
|
||||
$sql .= "where domain_uuid = '$domain_uuid' ";
|
||||
$sql .= "and rss_category = '$rss_category' ";
|
||||
$sql .= "and length(rss_del_date) = 0 ";
|
||||
$sql .= "or domain_uuid = '$domain_uuid' ";
|
||||
$sql .= "and rss_category = '$rss_category' ";
|
||||
$sql .= "and rss_del_date is null ";
|
||||
if (strlen($order_by)> 0) {
|
||||
$sql .= "order by $order_by $order ";
|
||||
}
|
||||
else {
|
||||
$sql .= "order by rss_order asc ";
|
||||
}
|
||||
//echo $sql;
|
||||
$prep_statement = $db->prepare(check_sql($sql));
|
||||
$prep_statement->execute();
|
||||
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||
$result_count = count($result);
|
||||
|
||||
$c = 0;
|
||||
$row_style["0"] = "row_style0";
|
||||
$row_style["1"] = "row_style1";
|
||||
|
||||
echo "<div align='left'>\n";
|
||||
echo "<table width='100%' border='0' cellpadding='2' cellspacing='0'>\n";
|
||||
echo "<tr>";
|
||||
echo th_order_by('rss_title', 'Title', $order_by, $order);
|
||||
echo th_order_by('rss_link', 'Link', $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_order', 'Order', $order_by, $order);
|
||||
if ($result_count == 0) { //no results
|
||||
echo "<td align='right' width='21'>\n";
|
||||
}
|
||||
else {
|
||||
echo "<td align='right' width='42'>\n";
|
||||
}
|
||||
echo " <a href='rssadd.php' alt='add'>$v_link_label_add</a>\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>";
|
||||
|
||||
if ($result_count > 0) {
|
||||
foreach($result as $row) {
|
||||
//print_r( $row );
|
||||
echo "<tr style='".$row_style[$c]."'>\n";
|
||||
//echo "<td valign='top'><a href='rssupdate.php?rss_uuid=".$row[rss_uuid]."'>".$row[rss_uuid]."</a></td>";
|
||||
//echo "<td valign='top'>".$row[rss_category]."</td>";
|
||||
|
||||
echo "<td valign='top' nowrap class='".$row_style[$c]."'> ".$row[rss_title]." </td>";
|
||||
echo "<td valign='top' nowrap class='".$row_style[$c]."'> <a href='/index.php?c=".$row[rss_link]."'>".$row[rss_link]."</a> </td>";
|
||||
//echo "<td valign='top' class='".$row_style[$c]."'>".$row[rss_sub_category]." </td>";
|
||||
if (strlen($row[rss_group]) > 0) {
|
||||
echo "<td valign='top' class='".$row_style[$c]."'>".$row[rss_group]."</td>";
|
||||
}
|
||||
else {
|
||||
echo "<td valign='top' class='".$row_style[$c]."'>public</td>";
|
||||
}
|
||||
|
||||
//echo "<td valign='top'>".$row[rss_description]."</td>";
|
||||
//echo "<td valign='top'>".$row[rss_img]."</td>";
|
||||
//echo "<td valign='top'> ".$row[rss_optional_1]." </td>"; //priority
|
||||
|
||||
//echo "<td valign='top' class='".$row_style[$c]."'> ";
|
||||
//sif ($row[rss_optional_2]=="100") {
|
||||
// echo "Complete";
|
||||
//}
|
||||
//else {
|
||||
// echo $row[rss_optional_2]."%";
|
||||
//}
|
||||
//echo " </td>"; //completion status
|
||||
|
||||
//echo "<td valign='top'>".$row[rss_optional_3]."</td>";
|
||||
//echo "<td valign='top'>".$row[rss_optional_4]."</td>";
|
||||
//echo "<td valign='top'>".$row[rss_optional_5]."</td>";
|
||||
echo "<td valign='top' class='".$row_style[$c]."'>".$row[rss_order]." </td>";
|
||||
|
||||
//echo "<td valign='top' align='center'>";
|
||||
//echo " <input type='button' class='btn' name='' onclick=\"window.location='rssmoveup.php?menuparentid=".$row[menuparentid]."&rss_uuid=".$row[rss_uuid]."&rss_order=".$row[rss_order]."'\" value='<' title='".$row[rss_order].". Move Up'>";
|
||||
//echo " <input type='button' class='btn' name='' onclick=\"window.location='rssmovedown.php?menuparentid=".$row[menuparentid]."&rss_uuid=".$row[rss_uuid]."&rss_order=".$row[rss_order]."'\" value='>' title='".$row[rss_order].". Move Down'>";
|
||||
//echo "</td>";
|
||||
|
||||
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='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 " </td>\n";
|
||||
|
||||
//echo "<td valign='top' align='right' class='".$row_style[$c]."'>";
|
||||
//echo " <input type='button' class='btn' name='' onclick=\"if (confirm('Are you sure you wish to continue?')) { window.location='rssdelete.php?rss_uuid=".$row[rss_uuid]."' }\" value='Delete'>";
|
||||
//echo "</td>";
|
||||
|
||||
echo "</tr>";
|
||||
|
||||
if ($c==0) { $c=1; } else { $c=0; }
|
||||
} //end foreach
|
||||
unset($sql, $result, $row_count);
|
||||
|
||||
} //end if results
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td colspan='6' align='left'>\n";
|
||||
|
||||
echo " <table border='0' width='100%' cellpadding='0' cellspacing='0'>\n";
|
||||
echo " <tr>\n";
|
||||
echo " <td width='33.3%' nowrap> </td>\n";
|
||||
echo " <td width='33.3%' align='center' nowrap>$paging_controls</td>\n";
|
||||
echo " <td width='33.3%' align='right'>\n";
|
||||
echo " <a href='rssadd.php' alt='add'>$v_link_label_add</a>\n";
|
||||
echo " </td>\n";
|
||||
echo " </tr>\n";
|
||||
echo " </table>\n";
|
||||
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
echo "</table>\n";
|
||||
echo "</div>\n";
|
||||
|
||||
echo " <br>";
|
||||
echo " </td>\n";
|
||||
echo "</tr>\n";
|
||||
echo "</table>\n";
|
||||
//echo "<input type='button' class='btn' name='' onclick=\"window.location='rsssearch.php'\" value='Search'> \n";
|
||||
//echo "<input type='button' class='btn' name='' onclick=\"window.location='rssadd.php'\" value='Add $module_title'> \n";
|
||||
echo "</div>";
|
||||
|
||||
echo "<br><br>";
|
||||
require_once "includes/footer.php";
|
||||
|
||||
unset ($result_count);
|
||||
unset ($result);
|
||||
unset ($key);
|
||||
unset ($val);
|
||||
unset ($c);
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,92 @@
|
||||
<?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>
|
||||
*/
|
||||
include "root.php";
|
||||
require_once "includes/require.php";
|
||||
require_once "includes/checkauth.php";
|
||||
require_once "config.php";
|
||||
if (permission_exists('content_edit')) {
|
||||
//access granted
|
||||
}
|
||||
else {
|
||||
echo "access denied";
|
||||
exit;
|
||||
}
|
||||
|
||||
//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
|
||||
|
||||
if (count($_GET)>0) {
|
||||
$rss_uuid = check_str($_GET["rss_uuid"]);
|
||||
$rss_order = check_str($_GET["rss_order"]);
|
||||
|
||||
$sql = "SELECT rss_order FROM v_rss ";
|
||||
$sql .= "where domain_uuid = '$domain_uuid' ";
|
||||
$sql .= "and rss_category = '$rss_category' ";
|
||||
$sql .= "order by rss_order desc ";
|
||||
$sql .= "limit 1 ";
|
||||
//echo $sql."<br><br>";
|
||||
//return;
|
||||
$prep_statement = $db->prepare(check_sql($sql));
|
||||
$prep_statement->execute();
|
||||
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||
foreach ($result as &$row) {
|
||||
//print_r( $row );
|
||||
$highestrss_order = $row[rss_order];
|
||||
}
|
||||
unset($prep_statement);
|
||||
|
||||
if ($rss_order != $highestrss_order) {
|
||||
//move the current item's order number up
|
||||
$sql = "update v_rss set ";
|
||||
$sql .= "rss_order = (rss_order-1) "; //move down
|
||||
$sql .= "where domain_uuid = '$domain_uuid' ";
|
||||
$sql .= "and rss_order = ".($rss_order+1)." ";
|
||||
$sql .= "and rss_category = '$rss_category' ";
|
||||
//echo $sql."<br><br>";
|
||||
$db->exec(check_sql($sql));
|
||||
unset($sql);
|
||||
|
||||
//move the selected item's order number down
|
||||
$sql = "update v_rss set ";
|
||||
$sql .= "rss_order = (rss_order+1) "; //move up
|
||||
$sql .= "where domain_uuid = '$domain_uuid' ";
|
||||
$sql .= "and rss_uuid = '$rss_uuid' ";
|
||||
$sql .= "and rss_category = '$rss_category' ";
|
||||
//echo $sql."<br><br>";
|
||||
$db->exec(check_sql($sql));
|
||||
unset($sql);
|
||||
}
|
||||
require_once "includes/header.php";
|
||||
echo "<meta http-equiv=\"refresh\" content=\"1;url=rsslist.php?rss_uuid=$rss_uuid\">\n";
|
||||
echo "<div align='center'>";
|
||||
echo "Item Moved Down";
|
||||
echo "</div>";
|
||||
require_once "includes/footer.php";
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,76 @@
|
||||
<?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>
|
||||
*/
|
||||
include "root.php";
|
||||
require_once "includes/require.php";
|
||||
require_once "includes/checkauth.php";
|
||||
require_once "config.php";
|
||||
if (permission_exists('content_view')) {
|
||||
//access granted
|
||||
}
|
||||
else {
|
||||
echo "access denied";
|
||||
exit;
|
||||
}
|
||||
|
||||
//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
|
||||
|
||||
if (count($_GET)>0) {
|
||||
$rss_uuid = check_str($_GET["rss_uuid"]);
|
||||
$rss_order = check_str($_GET["rss_order"]);
|
||||
if ($rss_order != 1) {
|
||||
//move the current item's order number down
|
||||
$sql = "update v_rss set ";
|
||||
$sql .= "rss_order = (rss_order+1) "; //move down
|
||||
$sql .= "where domain_uuid = '$domain_uuid' ";
|
||||
$sql .= "and rss_order = ".($rss_order-1)." ";
|
||||
$sql .= "and rss_category = '$rss_category' ";
|
||||
//echo $sql."<br><br>";
|
||||
$db->exec(check_sql($sql));
|
||||
unset($sql);
|
||||
|
||||
|
||||
//move the selected item's order number up
|
||||
$sql = "update v_rss set ";
|
||||
$sql .= "rss_order = (rss_order-1) "; //move up
|
||||
$sql .= "where domain_uuid = '$domain_uuid' ";
|
||||
$sql .= "and rss_uuid = '$rss_uuid' ";
|
||||
$sql .= "and rss_category = '$rss_category' ";
|
||||
//echo $sql."<br><br>";
|
||||
$db->exec(check_sql($sql));
|
||||
unset($sql);
|
||||
}
|
||||
require_once "includes/header.php";
|
||||
echo "<meta http-equiv=\"refresh\" content=\"1;url=rsslist.php?rss_uuid=$rss_uuid\">\n";
|
||||
echo "<div align='center'>";
|
||||
echo "Item Moved Up";
|
||||
echo "</div>";
|
||||
require_once "includes/footer.php";
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,277 @@
|
||||
<?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>
|
||||
*/
|
||||
return; //disabled
|
||||
|
||||
include "root.php";
|
||||
require_once "includes/require.php";
|
||||
require_once "includes/checkauth.php";
|
||||
require_once "config.php";
|
||||
if (permission_exists('content_view')) {
|
||||
//access granted
|
||||
}
|
||||
else {
|
||||
echo "access denied";
|
||||
exit;
|
||||
}
|
||||
|
||||
if (count($_POST)>0) {
|
||||
$rss_uuid = check_str($_POST["rss_uuid"]);
|
||||
//$rss_category = check_str($_POST["rss_category"]); //defined in local config.php
|
||||
$rss_sub_category = check_str($_POST["rss_sub_category"]);
|
||||
$rss_title = check_str($_POST["rss_title"]);
|
||||
$rss_link = check_str($_POST["rss_link"]);
|
||||
$rss_description = check_str($_POST["rss_description"]);
|
||||
$rss_img = check_str($_POST["rss_img"]);
|
||||
$rss_optional_1 = check_str($_POST["rss_optional_1"]);
|
||||
$rss_optional_2 = check_str($_POST["rss_optional_2"]);
|
||||
$rss_optional_3 = check_str($_POST["rss_optional_3"]);
|
||||
$rss_optional_4 = check_str($_POST["rss_optional_4"]);
|
||||
$rss_optional_5 = check_str($_POST["rss_optional_5"]);
|
||||
$rss_add_date = check_str($_POST["rss_add_date"]);
|
||||
$rss_add_user = check_str($_POST["rss_add_user"]);
|
||||
|
||||
require_once "includes/header.php";
|
||||
|
||||
|
||||
|
||||
echo "<div align='center'>";
|
||||
echo "<table border='0' cellpadding='0' cellspacing='2'>\n";
|
||||
|
||||
echo "<tr class='border'>\n";
|
||||
echo " <td align=\"left\">\n";
|
||||
echo " <br>";
|
||||
|
||||
|
||||
$sql = "";
|
||||
$sql .= "select * from v_rss ";
|
||||
$sql .= "where ";
|
||||
if (strlen($rss_uuid) > 0) { $sql .= "and rss_uuid like '%$rss_uuid%' "; }
|
||||
if (strlen($rss_category) > 0) { $sql .= "and rss_category like '%$rss_category%' "; }
|
||||
if (strlen($rss_sub_category) > 0) { $sql .= "and rss_sub_category like '%$rss_sub_category%' "; }
|
||||
if (strlen($rss_title) > 0) { $sql .= "and rss_title like '%$rss_title%' "; }
|
||||
if (strlen($rss_link) > 0) { $sql .= "and rss_link like '%$rss_link%' "; }
|
||||
if (strlen($rss_description) > 0) { $sql .= "and rss_description like '%$rss_description%' "; }
|
||||
if (strlen($rss_img) > 0) { $sql .= "and rss_img like '%$rss_img%' "; }
|
||||
if (strlen($rss_optional_1) > 0) { $sql .= "and rss_optional_1 like '%$rss_optional_1%' "; }
|
||||
if (strlen($rss_optional_2) > 0) { $sql .= "and rss_optional_2 like '%$rss_optional_2%' "; }
|
||||
if (strlen($rss_optional_3) > 0) { $sql .= "and rss_optional_3 like '%$rss_optional_3%' "; }
|
||||
if (strlen($rss_optional_4) > 0) { $sql .= "and rss_optional_4 like '%$rss_optional_4%' "; }
|
||||
if (strlen($rss_optional_5) > 0) { $sql .= "and rss_optional_5 like '%$rss_optional_5%' "; }
|
||||
if (strlen($rss_add_date) > 0) { $sql .= "and rss_add_date like '%$rss_add_date%' "; }
|
||||
if (strlen($rss_add_user) > 0) { $sql .= "and rss_add_user like '%$rss_add_user%' "; }
|
||||
$sql .= "and length(rss_del_date) = 0 ";
|
||||
$sql .= "or ";
|
||||
if (strlen($rss_uuid) > 0) { $sql .= "and rss_uuid like '%$rss_uuid%' "; }
|
||||
if (strlen($rss_category) > 0) { $sql .= "and rss_category like '%$rss_category%' "; }
|
||||
if (strlen($rss_sub_category) > 0) { $sql .= "and rss_sub_category like '%$rss_sub_category%' "; }
|
||||
if (strlen($rss_title) > 0) { $sql .= "and rss_title like '%$rss_title%' "; }
|
||||
if (strlen($rss_link) > 0) { $sql .= "and rss_link like '%$rss_link%' "; }
|
||||
if (strlen($rss_description) > 0) { $sql .= "and rss_description like '%$rss_description%' "; }
|
||||
if (strlen($rss_img) > 0) { $sql .= "and rss_img like '%$rss_img%' "; }
|
||||
if (strlen($rss_optional_1) > 0) { $sql .= "and rss_optional_1 like '%$rss_optional_1%' "; }
|
||||
if (strlen($rss_optional_2) > 0) { $sql .= "and rss_optional_2 like '%$rss_optional_2%' "; }
|
||||
if (strlen($rss_optional_3) > 0) { $sql .= "and rss_optional_3 like '%$rss_optional_3%' "; }
|
||||
if (strlen($rss_optional_4) > 0) { $sql .= "and rss_optional_4 like '%$rss_optional_4%' "; }
|
||||
if (strlen($rss_optional_5) > 0) { $sql .= "and rss_optional_5 like '%$rss_optional_5%' "; }
|
||||
if (strlen($rss_add_date) > 0) { $sql .= "and rss_add_date like '%$rss_add_date%' "; }
|
||||
if (strlen($rss_add_user) > 0) { $sql .= "and rss_add_user like '%$rss_add_user%' "; }
|
||||
$sql .= "and rss_del_date is null ";
|
||||
|
||||
$sql = trim($sql);
|
||||
if (substr($sql, -5) == "where"){ $sql = substr($sql, 0, (strlen($sql)-5)); }
|
||||
if (substr($sql, -3) == " or"){ $sql = substr($sql, 0, (strlen($sql)-5)); }
|
||||
$sql = str_replace ("where and", "where", $sql);
|
||||
$sql = str_replace ("or and", "or", $sql);
|
||||
//echo $sql;
|
||||
$prep_statement = $db->prepare(check_sql($sql));
|
||||
$prep_statement->execute();
|
||||
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||
$result_count = count($result);
|
||||
|
||||
$c = 0;
|
||||
$row_style["0"] = "background-color: #F5F5DC;";
|
||||
$row_style["1"] = "background-color: #FFFFFF;";
|
||||
|
||||
echo "<b>Search Results</b><br>";
|
||||
echo "<div align='left'>\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>";
|
||||
|
||||
if ($result_count == 0) { //no results
|
||||
echo "<tr><td> </td></tr>";
|
||||
}
|
||||
else { //received results
|
||||
|
||||
echo "<tr>";
|
||||
echo "<th nowrap> ID </th>";
|
||||
echo "<th nowrap> Category </th>";
|
||||
echo "<th nowrap> Sub Category </th>";
|
||||
echo "<th nowrap> Title </th>";
|
||||
//echo "<th nowrap> rss_link </th>";
|
||||
//echo "<th nowrap> rss_description </th>";
|
||||
//echo "<th nowrap> rss_img </th>";
|
||||
//echo "<th nowrap> rss_optional_1 </th>";
|
||||
//echo "<th nowrap> rss_optional_2 </th>";
|
||||
//echo "<th nowrap> rss_optional_3 </th>";
|
||||
//echo "<th nowrap> rss_optional_4 </th>";
|
||||
//echo "<th nowrap> rss_optional_5 </th>";
|
||||
//echo "<th nowrap> rss_add_date </th>";
|
||||
//echo "<th nowrap> rss_add_user </th>";
|
||||
echo "</tr>";
|
||||
echo "<tr><td colspan='100%'><img src='/images/spacer.gif' width='100%' height='1' style='background-color: #BBBBBB;'></td></tr>\n";
|
||||
|
||||
foreach($result as $row) {
|
||||
//print_r( $row );
|
||||
echo "<tr style='".$row_style[$c]."'>\n";
|
||||
echo "<td valign='top'><a href='rssupdate.php?rss_uuid=".$row[rss_uuid]."'>".$row[rss_uuid]."</a></td>";
|
||||
echo "<td valign='top'>".$row[rss_category]."</td>";
|
||||
echo "<td valign='top'>".$row[rss_sub_category]."</td>";
|
||||
echo "<td valign='top'>".$row[rss_title]."</td>";
|
||||
//echo "<td valign='top'>".$row[rss_link]."</td>";
|
||||
//echo "<td valign='top'>".$row[rss_description]."</td>";
|
||||
//echo "<td valign='top'>".$row[rss_img]."</td>";
|
||||
//echo "<td valign='top'>".$row[rss_optional_1]."</td>";
|
||||
//echo "<td valign='top'>".$row[rss_optional_2]."</td>";
|
||||
//echo "<td valign='top'>".$row[rss_optional_3]."</td>";
|
||||
//echo "<td valign='top'>".$row[rss_optional_4]."</td>";
|
||||
//echo "<td valign='top'>".$row[rss_optional_5]."</td>";
|
||||
//echo "<td valign='top'>".$row[rss_add_date]."</td>";
|
||||
//echo "<td valign='top'>".$row[rss_add_user]."</td>";
|
||||
echo "</tr>";
|
||||
|
||||
echo "<tr><td colspan='100%'><img src='/images/spacer.gif' width='100%' height='1' style='background-color: #BBBBBB;'></td></tr>\n";
|
||||
if ($c==0) { $c=1; } else { $c=0; }
|
||||
} //end foreach unset($sql, $result, $row_count);
|
||||
|
||||
echo "</table>\n";
|
||||
echo "</div>\n";
|
||||
|
||||
|
||||
echo " <br><br>";
|
||||
echo " </td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
} //end if results
|
||||
|
||||
echo "</table>\n";
|
||||
echo "</div>";
|
||||
|
||||
echo "<br><br>";
|
||||
require_once "includes/footer.php";
|
||||
|
||||
unset ($result_count);
|
||||
unset ($result);
|
||||
unset ($key);
|
||||
unset ($val);
|
||||
unset ($c);
|
||||
|
||||
}
|
||||
else {
|
||||
|
||||
echo "\n"; require_once "includes/header.php";
|
||||
echo "<div align='center'>";
|
||||
echo "<table border='0' cellpadding='0' cellspacing='2'>\n";
|
||||
|
||||
echo "<tr class='border'>\n";
|
||||
echo " <td align=\"left\">\n";
|
||||
echo " <br>";
|
||||
|
||||
|
||||
echo "<form method='post' action=''>";
|
||||
echo "<table>";
|
||||
echo " <tr>";
|
||||
echo " <td>Id:</td>";
|
||||
echo " <td><input type='text' class='txt' name='rss_uuid'></td>";
|
||||
echo " </tr>";
|
||||
echo " <tr>";
|
||||
echo " <td>Category:</td>";
|
||||
echo " <td><input type='text' class='txt' name='rss_category'></td>";
|
||||
echo " </tr>";
|
||||
//echo " <tr>";
|
||||
//echo " <td>rss_sub_category:</td>";
|
||||
//echo " <td><input type='text' class='txt' name='rss_sub_category'></td>";
|
||||
//echo " </tr>";
|
||||
echo " <tr>";
|
||||
echo " <td>Title:</td>";
|
||||
echo " <td><input type='text' class='txt' name='rss_title'></td>";
|
||||
echo " </tr>";
|
||||
echo " <tr>";
|
||||
echo " <td>Link:</td>";
|
||||
echo " <td><input type='text' class='txt' name='rss_link'></td>";
|
||||
echo " </tr>";
|
||||
echo " <tr>";
|
||||
echo " <td>Desc:</td>";
|
||||
echo " <td><input type='text' class='txt' name='rss_description'></td>";
|
||||
echo " </tr>";
|
||||
//echo " <tr>";
|
||||
//echo " <td>Image:</td>";
|
||||
//echo " <td><input type='text' class='txt' name='rss_img'></td>";
|
||||
//echo " </tr>";
|
||||
//echo " <tr>";
|
||||
//echo " <td>rss_optional_1:</td>";
|
||||
//echo " <td><input type='text' class='txt' name='rss_optional_1'></td>";
|
||||
//echo " </tr>";
|
||||
//echo " <tr>";
|
||||
//echo " <td>rss_optional_2:</td>";
|
||||
//echo " <td><input type='text' class='txt' name='rss_optional_2'></td>";
|
||||
//echo " </tr>";
|
||||
//echo " <tr>";
|
||||
//echo " <td>rss_optional_3:</td>";
|
||||
//echo " <td><input type='text' class='txt' name='rss_optional_3'></td>";
|
||||
//echo " </tr>";
|
||||
//echo " <tr>";
|
||||
//echo " <td>rss_optional_4:</td>";
|
||||
//echo " <td><input type='text' class='txt' name='rss_optional_4'></td>";
|
||||
//echo " </tr>";
|
||||
//echo " <tr>";
|
||||
//echo " <td>rss_optional_5:</td>";
|
||||
//echo " <td><input type='text' class='txt' name='rss_optional_5'></td>";
|
||||
//echo " </tr>";
|
||||
//echo " <tr>";
|
||||
//echo " <td>rss_add_date:</td>";
|
||||
//echo " <td><input type='text' class='txt' name='rss_add_date'></td>";
|
||||
//echo " </tr>";
|
||||
//echo " <tr>";
|
||||
//echo " <td>rss_add_user:</td>";
|
||||
//echo " <td><input type='text' class='txt' name='rss_add_user'></td>";
|
||||
//echo " </tr>";
|
||||
echo " <tr>";
|
||||
echo " <td colspan='2' align='right'><input type='submit' name='submit' class='btn' value='Search'></td>";
|
||||
echo " </tr>";
|
||||
echo "</table>";
|
||||
echo "</form>";
|
||||
|
||||
|
||||
echo " </td>";
|
||||
echo " </tr>";
|
||||
echo "</table>";
|
||||
echo "</div>";
|
||||
|
||||
|
||||
require_once "includes/footer.php";
|
||||
|
||||
} //end if not post
|
||||
?>
|
||||
@@ -0,0 +1,174 @@
|
||||
<?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>
|
||||
*/
|
||||
include "root.php";
|
||||
require_once "includes/require.php";
|
||||
require_once "includes/checkauth.php";
|
||||
require_once "config.php";
|
||||
if (permission_exists('content_add')) {
|
||||
//access granted
|
||||
}
|
||||
else {
|
||||
echo "access denied";
|
||||
exit;
|
||||
}
|
||||
|
||||
$rss_uuid = $_GET["rss_uuid"];
|
||||
|
||||
if (count($_POST)>0) {
|
||||
$rss_uuid = check_str($_POST["rss_uuid"]);
|
||||
$rss_sub_title = check_str($_POST["rss_sub_title"]);
|
||||
$rss_sub_link = check_str($_POST["rss_sub_link"]);
|
||||
$rss_sub_description = check_str($_POST["rss_sub_description"]);
|
||||
$rss_sub_optional_1 = check_str($_POST["rss_sub_optional_1"]);
|
||||
$rss_sub_optional_2 = check_str($_POST["rss_sub_optional_2"]);
|
||||
$rss_sub_optional_3 = check_str($_POST["rss_sub_optional_3"]);
|
||||
$rss_sub_optional_4 = check_str($_POST["rss_sub_optional_4"]);
|
||||
$rss_sub_optional_5 = check_str($_POST["rss_sub_optional_5"]);
|
||||
$rss_sub_add_date = check_str($_POST["rss_sub_add_date"]);
|
||||
$rss_sub_add_user = check_str($_POST["rss_sub_add_user"]);
|
||||
|
||||
$rss_sub_uuid = uuid();
|
||||
$sql = "insert into v_rss_sub ";
|
||||
$sql .= "(";
|
||||
$sql .= "domain_uuid, ";
|
||||
$sql .= "rss_uuid, ";
|
||||
$sql .= "rss_sub_uuid, ";
|
||||
$sql .= "rss_sub_title, ";
|
||||
$sql .= "rss_sub_link, ";
|
||||
$sql .= "rss_sub_description, ";
|
||||
$sql .= "rss_sub_optional_1, ";
|
||||
$sql .= "rss_sub_optional_2, ";
|
||||
$sql .= "rss_sub_optional_3, ";
|
||||
$sql .= "rss_sub_optional_4, ";
|
||||
$sql .= "rss_sub_optional_5, ";
|
||||
$sql .= "rss_sub_add_date, ";
|
||||
$sql .= "rss_sub_add_user ";
|
||||
$sql .= ")";
|
||||
$sql .= "values ";
|
||||
$sql .= "(";
|
||||
$sql .= "'$domain_uuid', ";
|
||||
$sql .= "'$rss_uuid', ";
|
||||
$sql .= "'$rss_sub_uuid', ";
|
||||
$sql .= "'$rss_sub_title', ";
|
||||
$sql .= "'$rss_sub_link', ";
|
||||
$sql .= "'$rss_sub_description', ";
|
||||
$sql .= "'$rss_sub_optional_1', ";
|
||||
$sql .= "'$rss_sub_optional_2', ";
|
||||
$sql .= "'$rss_sub_optional_3', ";
|
||||
$sql .= "'$rss_sub_optional_4', ";
|
||||
$sql .= "'$rss_sub_optional_5', ";
|
||||
$sql .= "now(), ";
|
||||
$sql .= "'".$_SESSION["username"]."' ";
|
||||
$sql .= ")";
|
||||
$db->exec(check_sql($sql));
|
||||
unset($sql);
|
||||
|
||||
require_once "includes/header.php";
|
||||
echo "<meta http-equiv=\"refresh\" content=\"2;url=rsssublist.php?rss_uuid=$rss_uuid\">\n";
|
||||
echo "<div align='center'>";
|
||||
echo "Add Complete";
|
||||
echo "</div>";
|
||||
require_once "includes/footer.php";
|
||||
return;
|
||||
}
|
||||
|
||||
//show the header
|
||||
require_once "includes/header.php";
|
||||
require_once "includes/wysiwyg.php";
|
||||
|
||||
//show the content
|
||||
echo "<div align='center'>";
|
||||
echo "<table border='0' cellpadding='0' cellspacing='2'>\n";
|
||||
echo "<tr class='border'>\n";
|
||||
echo " <td align=\"left\">\n";
|
||||
echo " <br>";
|
||||
|
||||
echo "<form method='post' action=''>";
|
||||
echo "<table width='100%'>";
|
||||
echo " <tr>";
|
||||
echo " <td nowrap>Title:</td>";
|
||||
echo " <td width='100%'><input type='text' class='txt' name='rss_sub_title'></td>";
|
||||
echo " </tr>";
|
||||
//echo " <tr>";
|
||||
//echo " <td>Link:</td>";
|
||||
//echo " <td><input type='text' class='txt' name='rss_sub_link'></td>";
|
||||
//echo " </tr>";
|
||||
echo " <tr>";
|
||||
echo " <td valign='top'>Description:</td>";
|
||||
echo " <td>";
|
||||
echo " <textarea class='txt' rows='12' name='rss_sub_description'></textarea>";
|
||||
echo " </td>";
|
||||
echo " </tr>";
|
||||
/*
|
||||
echo " <tr>";
|
||||
echo " <td>rss_sub_optional_1:</td>";
|
||||
echo " <td><input type='text' name='rss_sub_optional_1'></td>";
|
||||
echo " </tr>";
|
||||
echo " <tr>";
|
||||
echo " <td>rss_sub_optional_2:</td>";
|
||||
echo " <td><input type='text' name='rss_sub_optional_2'></td>";
|
||||
echo " </tr>";
|
||||
echo " <tr>";
|
||||
echo " <td>rss_sub_optional_3:</td>";
|
||||
echo " <td><input type='text' name='rss_sub_optional_3'></td>";
|
||||
echo " </tr>";
|
||||
echo " <tr>";
|
||||
echo " <td>rss_sub_optional_4:</td>";
|
||||
echo " <td><input type='text' name='rss_sub_optional_4'></td>";
|
||||
echo " </tr>";
|
||||
echo " <tr>";
|
||||
echo " <td>rss_sub_optional_5:</td>";
|
||||
echo " <td><input type='text' name='rss_sub_optional_5'></td>";
|
||||
echo " </tr>";
|
||||
echo " <tr>";
|
||||
echo " <td>rss_sub_add_date:</td>";
|
||||
echo " <td><input type='text' name='rss_sub_add_date'></td>";
|
||||
echo " </tr>";
|
||||
echo " <tr>";
|
||||
echo " <td>rss_sub_add_user:</td>";
|
||||
echo " <td><input type='text' name='rss_sub_add_user'></td>";
|
||||
echo " </tr>";
|
||||
*/
|
||||
//echo " <tr>";
|
||||
//echo " <td>example:</td>";
|
||||
//echo " <td><textarea name='example'></textarea></td>";
|
||||
//echo " </tr>"; echo " <tr>";
|
||||
echo " <td colspan='2' align='right'>";
|
||||
echo " <input type='hidden' name='rss_uuid' value='$rss_uuid'>";
|
||||
echo " <input type='submit' name='submit' class='btn' value='Add'>";
|
||||
echo " </td>";
|
||||
echo " </tr>";
|
||||
echo "</table>";
|
||||
echo "</form>";
|
||||
|
||||
echo " </td>";
|
||||
echo " </tr>";
|
||||
echo "</table>";
|
||||
echo "</div>";
|
||||
|
||||
//show the footer
|
||||
require_once "includes/footer.php";
|
||||
?>
|
||||
@@ -0,0 +1,117 @@
|
||||
<?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>
|
||||
*/
|
||||
include "root.php";
|
||||
require_once "includes/require.php";
|
||||
require_once "includes/checkauth.php";
|
||||
require_once "config.php";
|
||||
if (permission_exists('content_add')) {
|
||||
//access granted
|
||||
}
|
||||
else {
|
||||
echo "access denied";
|
||||
exit;
|
||||
}
|
||||
|
||||
if (count($_POST)>0) {
|
||||
$rss_sub_category_uuid = uuid();
|
||||
$rss_category = check_str($_POST["rss_category"]);
|
||||
$rss_sub_category = check_str($_POST["rss_sub_category"]);
|
||||
$rss_sub_category_description = check_str($_POST["rss_sub_category_description"]);
|
||||
$rss_add_user = check_str($_POST["rss_add_user"]);
|
||||
$rss_add_date = check_str($_POST["rss_add_date"]);
|
||||
|
||||
$sql = "insert into v_rss_sub_category ";
|
||||
$sql .= "(";
|
||||
$sql .= "domain_uuid, ";
|
||||
$sql .= "rss_sub_category_uuid, ";
|
||||
$sql .= "rss_category, ";
|
||||
$sql .= "rss_sub_category, ";
|
||||
$sql .= "rss_sub_category_description, ";
|
||||
$sql .= "rss_add_user, ";
|
||||
$sql .= "rss_add_date ";
|
||||
$sql .= ")";
|
||||
$sql .= "values ";
|
||||
$sql .= "(";
|
||||
$sql .= "'$domain_uuid', ";
|
||||
$sql .= "'$rss_sub_category_uuid', ";
|
||||
$sql .= "'$rss_category', ";
|
||||
$sql .= "'$rss_sub_category', ";
|
||||
$sql .= "'$rss_sub_category_description', ";
|
||||
$sql .= "'$rss_add_user', ";
|
||||
$sql .= "'$rss_add_date' ";
|
||||
$sql .= ")";
|
||||
$db->exec(check_sql($sql));
|
||||
unset($sql);
|
||||
|
||||
require_once "includes/header.php";
|
||||
echo "<meta http-equiv=\"refresh\" content=\"5;url=rss_sub_categorylist.php\">\n";
|
||||
echo "Add Complete";
|
||||
require_once "includes/footer.php";
|
||||
return;
|
||||
}
|
||||
|
||||
require_once "includes/header.php";
|
||||
echo "<div align='center'>";
|
||||
echo "<table border='0' cellpadding='0' cellspacing='2'>\n";
|
||||
echo "<tr class='border'>\n";
|
||||
echo " <td align=\"left\">\n";
|
||||
echo " <br>";
|
||||
|
||||
echo "<form method='post' action=''>";
|
||||
echo "<table>";
|
||||
echo " <tr>";
|
||||
echo " <td>RSS Category:</td>";
|
||||
echo " <td><input type='text' name='rss_category'></td>";
|
||||
echo " </tr>";
|
||||
echo " <tr>";
|
||||
echo " <td>rss_sub_category:</td>";
|
||||
echo " <td><input type='text' name='rss_sub_category'></td>";
|
||||
echo " </tr>";
|
||||
echo " <tr>";
|
||||
echo " <td>rss_sub_category_description:</td>";
|
||||
echo " <td><input type='text' name='rss_sub_category_description'></td>";
|
||||
echo " </tr>";
|
||||
echo " <tr>";
|
||||
echo " <td>rss_add_user:</td>";
|
||||
echo " <td><input type='text' name='rss_add_user'></td>";
|
||||
echo " </tr>";
|
||||
echo " <tr>";
|
||||
echo " <td>rss_add_date:</td>";
|
||||
echo " <td><input type='text' name='rss_add_date'></td>";
|
||||
echo " </tr>\n";
|
||||
echo " <tr>";
|
||||
echo " <td colspan='2' align='right'><input type='submit' name='submit' value='Add'></td>";
|
||||
echo " </tr>";
|
||||
echo "</table>";
|
||||
echo "</form>";
|
||||
|
||||
echo " </td>";
|
||||
echo " </tr>";
|
||||
echo "</table>";
|
||||
echo "</div>";
|
||||
|
||||
require_once "includes/footer.php";
|
||||
?>
|
||||
@@ -0,0 +1,204 @@
|
||||
<?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>
|
||||
*/
|
||||
include "root.php";
|
||||
require_once "includes/require.php";
|
||||
require_once "includes/checkauth.php";
|
||||
require_once "config.php";
|
||||
if (permission_exists('content_view')) {
|
||||
//access granted
|
||||
}
|
||||
else {
|
||||
echo "access denied";
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
require_once "includes/header.php";
|
||||
|
||||
$order_by = $_GET["order_by"];
|
||||
$order = $_GET["order"];
|
||||
|
||||
|
||||
|
||||
echo "<div align='center'>";
|
||||
echo "<table border='0' cellpadding='0' cellspacing='2'>\n";
|
||||
|
||||
echo "<tr class='border'>\n";
|
||||
echo " <td align=\"left\">\n";
|
||||
echo " <br>";
|
||||
|
||||
|
||||
$sql = "";
|
||||
$sql .= "select * from v_rss_sub_category ";
|
||||
$sql .= "where domain_uuid = '$domain_uuid' ";
|
||||
if (strlen($order_by)> 0) { $sql .= "order by $order_by $order "; }
|
||||
|
||||
$prep_statement = $db->prepare(check_sql($sql));
|
||||
$prep_statement->execute();
|
||||
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||
$result_count = count($result);
|
||||
|
||||
$c = 0;
|
||||
$row_style["0"] = "background-color: #F5F5DC;";
|
||||
$row_style["1"] = "background-color: #FFFFFF;";
|
||||
|
||||
echo "<div align='left'>\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>";
|
||||
|
||||
if ($result_count == 0) { //no results
|
||||
echo "<tr><td> </td></tr>";
|
||||
}
|
||||
else { //received results
|
||||
|
||||
echo "<tr>";
|
||||
echo "<th nowrap> ";
|
||||
if (strlen($order_by)==0) {
|
||||
echo "<a href='?order_by=rss_sub_category_uuid&order=desc' title='ascending'>rss_sub_category_uuid</a>";
|
||||
}
|
||||
else {
|
||||
if ($order=="asc") {
|
||||
echo "<a href='?order_by=rss_sub_category_uuid&order=desc' title='ascending'>rss_sub_category_uuid</a>";
|
||||
}
|
||||
else {
|
||||
echo "<a href='?order_by=rss_sub_category_uuid&order=asc' title='descending'>rss_sub_category_uuid</a>";
|
||||
}
|
||||
}
|
||||
echo " </th>";
|
||||
|
||||
echo "<th nowrap> ";
|
||||
if (strlen($order_by)==0) {
|
||||
echo "<a href='?order_by=rss_category&order=desc' title='ascending'>rss_category</a>";
|
||||
}
|
||||
else {
|
||||
if ($order=="asc") {
|
||||
echo "<a href='?order_by=rss_category&order=desc' title='ascending'>rss_category</a>";
|
||||
}
|
||||
else {
|
||||
echo "<a href='?order_by=rss_category&order=asc' title='descending'>rss_category</a>";
|
||||
}
|
||||
}
|
||||
echo " </th>";
|
||||
|
||||
echo "<th nowrap> ";
|
||||
if (strlen($order_by)==0) {
|
||||
echo "<a href='?order_by=rss_sub_category&order=desc' title='ascending'>rss_sub_category</a>";
|
||||
}
|
||||
else {
|
||||
if ($order=="asc") {
|
||||
echo "<a href='?order_by=rss_sub_category&order=desc' title='ascending'>rss_sub_category</a>";
|
||||
}
|
||||
else {
|
||||
echo "<a href='?order_by=rss_sub_category&order=asc' title='descending'>rss_sub_category</a>";
|
||||
}
|
||||
}
|
||||
echo " </th>";
|
||||
|
||||
echo "<th nowrap> ";
|
||||
if (strlen($order_by)==0) {
|
||||
echo "<a href='?order_by=rss_sub_category_description&order=desc' title='ascending'>rss_sub_category_description</a>";
|
||||
}
|
||||
else {
|
||||
if ($order=="asc") {
|
||||
echo "<a href='?order_by=rss_sub_category_description&order=desc' title='ascending'>rss_sub_category_description</a>";
|
||||
}
|
||||
else {
|
||||
echo "<a href='?order_by=rss_sub_category_description&order=asc' title='descending'>rss_sub_category_description</a>";
|
||||
}
|
||||
}
|
||||
echo " </th>";
|
||||
|
||||
echo "<th nowrap> ";
|
||||
if (strlen($order_by)==0) {
|
||||
echo "<a href='?order_by=rss_add_user&order=desc' title='ascending'>rss_add_user</a>";
|
||||
}
|
||||
else {
|
||||
if ($order=="asc") {
|
||||
echo "<a href='?order_by=rss_add_user&order=desc' title='ascending'>rss_add_user</a>";
|
||||
}
|
||||
else {
|
||||
echo "<a href='?order_by=rss_add_user&order=asc' title='descending'>rss_add_user</a>";
|
||||
}
|
||||
}
|
||||
echo " </th>";
|
||||
|
||||
echo "<th nowrap> ";
|
||||
if (strlen($order_by)==0) {
|
||||
echo "<a href='?order_by=rss_add_date&order=desc' title='ascending'>rss_add_date</a>";
|
||||
}
|
||||
else {
|
||||
if ($order=="asc") {
|
||||
echo "<a href='?order_by=rss_add_date&order=desc' title='ascending'>rss_add_date</a>";
|
||||
}
|
||||
else {
|
||||
echo "<a href='?order_by=rss_add_date&order=asc' title='descending'>rss_add_date</a>";
|
||||
}
|
||||
}
|
||||
echo " </th>";
|
||||
|
||||
echo "</tr>";
|
||||
echo "<tr><td colspan='100%'><img src='/images/spacer.gif' width='100%' height='1' style='background-color: #BBBBBB;'></td></tr>\n";
|
||||
|
||||
foreach($result as $row) {
|
||||
//print_r( $row );
|
||||
echo "<tr style='".$row_style[$c]."'>\n";
|
||||
echo "<td valign='top'><a href='rss_sub_categoryupdate.php?rss_sub_category_uuid=".$row[rss_sub_category_uuid]."'>".$row[rss_sub_category_uuid]."</a></td>";
|
||||
echo "<td valign='top'>".$row[rss_category]."</td>";
|
||||
echo "<td valign='top'>".$row[rss_sub_category]."</td>";
|
||||
echo "<td valign='top'>".$row[rss_sub_category_description]."</td>";
|
||||
echo "<td valign='top'>".$row[rss_add_user]."</td>";
|
||||
echo "<td valign='top'>".$row[rss_add_date]."</td>";
|
||||
echo "</tr>";
|
||||
|
||||
echo "<tr><td colspan='100%'><img src='/images/spacer.gif' width='100%' height='1' style='background-color: #BBBBBB;'></td></tr>\n";
|
||||
if ($c==0) { $c=1; } else { $c=0; }
|
||||
} //end foreach unset($sql, $result, $row_count);
|
||||
|
||||
echo "</table>\n";
|
||||
echo "</div>\n";
|
||||
|
||||
|
||||
echo " <br><br>";
|
||||
echo " </td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
} //end if results
|
||||
|
||||
echo "</table>\n";
|
||||
echo "<input type='button' class='btn' name='' onclick=\"window.location='rss_sub_categorysearch.php'\" value='Search'> \n";
|
||||
echo "<input type='button' class='btn' name='' onclick=\"window.location='rss_sub_categoryadd.php'\" value='Add'> \n";
|
||||
echo "</div>";
|
||||
|
||||
echo "<br><br>";
|
||||
require_once "includes/footer.php";
|
||||
|
||||
unset ($result_count);
|
||||
unset ($result);
|
||||
unset ($key);
|
||||
unset ($val);
|
||||
unset ($c);
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,134 @@
|
||||
<?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>
|
||||
*/
|
||||
include "root.php";
|
||||
require_once "includes/require.php";
|
||||
require_once "includes/checkauth.php";
|
||||
require_once "config.php";
|
||||
if (permission_exists('content_edit')) {
|
||||
//access granted
|
||||
}
|
||||
else {
|
||||
echo "access denied";
|
||||
exit;
|
||||
}
|
||||
|
||||
if (count($_POST)>0) {
|
||||
$rss_sub_category_uuid = check_str($_POST["rss_sub_category_uuid"]);
|
||||
$rss_category = check_str($_POST["rss_category"]);
|
||||
$rss_sub_category = check_str($_POST["rss_sub_category"]);
|
||||
$rss_sub_category_description = check_str($_POST["rss_sub_category_description"]);
|
||||
$rss_add_user = check_str($_POST["rss_add_user"]);
|
||||
$rss_add_date = check_str($_POST["rss_add_date"]);
|
||||
|
||||
//sql update
|
||||
$sql = "update v_rss_sub_category set ";
|
||||
$sql .= "rss_category = '$rss_category', ";
|
||||
$sql .= "rss_sub_category = '$rss_sub_category', ";
|
||||
$sql .= "rss_sub_category_description = '$rss_sub_category_description', ";
|
||||
$sql .= "rss_add_user = '$rss_add_user', ";
|
||||
$sql .= "rss_add_date = '$rss_add_date' ";
|
||||
$sql .= "where domain_uuid = '$domain_uuid' ";
|
||||
$sql .= "and rss_sub_category_uuid = '$rss_sub_category_uuid' ";
|
||||
$count = $db->exec(check_sql($sql));
|
||||
//echo "Affected Rows: ".$count;
|
||||
|
||||
//edit: make sure the meta redirect url is correct
|
||||
require_once "includes/header.php";
|
||||
echo "<meta http-equiv=\"refresh\" content=\"5;url=rss_sub_categorylist.php\">\n";
|
||||
echo "Update Complete";
|
||||
require_once "includes/footer.php";
|
||||
return;
|
||||
}
|
||||
else {
|
||||
//get data from the db
|
||||
$rss_sub_category_uuid = $_GET["rss_sub_category_uuid"];
|
||||
|
||||
$sql = "";
|
||||
$sql .= "select * from v_rss_sub_category ";
|
||||
$sql .= "where domain_uuid = '$domain_uuid' ";
|
||||
$sql .= "and rss_sub_category_uuid = '$rss_sub_category_uuid' ";
|
||||
$prep_statement = $db->prepare(check_sql($sql));
|
||||
$prep_statement->execute();
|
||||
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||
foreach ($result as &$row) {
|
||||
$rss_category = $row["rss_category"];
|
||||
$rss_sub_category = $row["rss_sub_category"];
|
||||
$rss_sub_category_description = $row["rss_sub_category_description"];
|
||||
$rss_add_user = $row["rss_add_user"];
|
||||
$rss_add_date = $row["rss_add_date"];
|
||||
break; //limit to 1 row
|
||||
}
|
||||
}
|
||||
|
||||
require_once "includes/header.php";
|
||||
echo "<div align='center'>";
|
||||
echo "<table border='0' cellpadding='0' cellspacing='2'>\n";
|
||||
|
||||
echo "<tr class='border'>\n";
|
||||
echo " <td align=\"left\">\n";
|
||||
echo " <br>";
|
||||
|
||||
|
||||
echo "<form method='post' action=''>";
|
||||
echo "<table>";
|
||||
echo " <tr>";
|
||||
echo " <td>rss_category:</td>";
|
||||
echo " <td><input type='text' name='rss_category' value='$rss_category'></td>";
|
||||
echo " </tr>";
|
||||
echo " <tr>";
|
||||
echo " <td>rss_sub_category:</td>";
|
||||
echo " <td><input type='text' name='rss_sub_category' value='$rss_sub_category'></td>";
|
||||
echo " </tr>";
|
||||
echo " <tr>";
|
||||
echo " <td>rss_sub_category_description:</td>";
|
||||
echo " <td><input type='text' name='rss_sub_category_description' value='$rss_sub_category_description'></td>";
|
||||
echo " </tr>";
|
||||
echo " <tr>";
|
||||
echo " <td>rss_add_user:</td>";
|
||||
echo " <td><input type='text' name='rss_add_user' value='$rss_add_user'></td>";
|
||||
echo " </tr>";
|
||||
echo " <tr>";
|
||||
echo " <td>rss_add_date:</td>";
|
||||
echo " <td><input type='text' name='rss_add_date' value='$rss_add_date'></td>";
|
||||
echo " </tr>";
|
||||
echo " <tr>";
|
||||
echo " <td colspan='2' align='right'>";
|
||||
echo " <input type='hidden' name='rss_sub_category_uuid' value='$rss_sub_category_uuid'>";
|
||||
echo " <input type='submit' name='submit' value='Update'>";
|
||||
echo " </td>";
|
||||
echo " </tr>";
|
||||
echo "</table>";
|
||||
echo "</form>";
|
||||
|
||||
|
||||
echo " </td>";
|
||||
echo " </tr>";
|
||||
echo "</table>";
|
||||
echo "</div>";
|
||||
|
||||
|
||||
require_once "includes/footer.php";
|
||||
?>
|
||||
@@ -0,0 +1,60 @@
|
||||
<?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>
|
||||
*/
|
||||
include "root.php";
|
||||
require_once "includes/require.php";
|
||||
require_once "includes/checkauth.php";
|
||||
require_once "config.php";
|
||||
if (permission_exists('content_delete')) {
|
||||
//access granted
|
||||
}
|
||||
else {
|
||||
echo "access denied";
|
||||
exit;
|
||||
}
|
||||
|
||||
if (count($_GET)>0) {
|
||||
$rss_uuid = check_str($_GET["rss_uuid"]);
|
||||
$rss_sub_uuid = check_str($_GET["rss_sub_uuid"]);
|
||||
|
||||
//mark the the item as deleted and who deleted it
|
||||
$sql = "update v_rss_sub set ";
|
||||
$sql .= "rss_sub_del_date = now(), ";
|
||||
$sql .= "rss_sub_del_user = '".$_SESSION["username"]."' ";
|
||||
$sql .= "where domain_uuid = '$domain_uuid' ";
|
||||
$sql .= "and rss_sub_uuid = '$rss_sub_uuid' ";
|
||||
$db->exec(check_sql($sql));
|
||||
unset($sql);
|
||||
|
||||
require_once "includes/header.php";
|
||||
echo "<meta http-equiv=\"refresh\" content=\"2;url=rsssublist.php?rss_uuid=$rss_uuid\">\n";
|
||||
echo "<div align='center'>";
|
||||
echo "Delete Completed";
|
||||
echo "</div>";
|
||||
require_once "includes/footer.php";
|
||||
return;
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,444 @@
|
||||
<?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>
|
||||
*/
|
||||
include "root.php";
|
||||
require_once "includes/require.php";
|
||||
require_once "includes/checkauth.php";
|
||||
require_once "config.php";
|
||||
if (permission_exists('content_view')) {
|
||||
//access granted
|
||||
}
|
||||
else {
|
||||
echo "access denied";
|
||||
exit;
|
||||
}
|
||||
|
||||
$rss_uuid = $_GET["rss_uuid"];
|
||||
$order_by = $_GET["order_by"];
|
||||
$order = $_GET["order"];
|
||||
|
||||
require_once "includes/header.php";
|
||||
|
||||
|
||||
echo "<div align='center'>";
|
||||
echo "<table width='500' border='0' cellpadding='0' cellspacing='2'>\n";
|
||||
echo "<tr class='border'>\n";
|
||||
echo " <td align=\"left\">\n";
|
||||
|
||||
echo " <br>";
|
||||
echo " <b>$module_title Details</b>";
|
||||
$sql = "";
|
||||
$sql .= "select * from v_rss ";
|
||||
$sql .= "where domain_uuid = '$domain_uuid' ";
|
||||
$sql .= "and rss_uuid = '$rss_uuid' ";
|
||||
$sql .= "and rss_category = '$rss_category' ";
|
||||
$sql .= "and length(rss_del_date) = 0 ";
|
||||
$sql .= "or domain_uuid = '$domain_uuid' ";
|
||||
$sql .= "and rss_uuid = '$rss_uuid' ";
|
||||
$sql .= "and rss_category = '$rss_category' ";
|
||||
$sql .= "and rss_del_date is null ";
|
||||
$sql .= "order by rss_uuid asc ";
|
||||
|
||||
//echo $sql;
|
||||
$prep_statement = $db->prepare(check_sql($sql));
|
||||
$prep_statement->execute();
|
||||
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||
$result_count = count($result);
|
||||
echo "<table border='0' width='100%'>";
|
||||
if ($result_count == 0) { //no results
|
||||
echo "<tr><td> </td></tr>";
|
||||
}
|
||||
else { //received results
|
||||
foreach($result as $row) {
|
||||
//print_r( $row );
|
||||
//echo "<tr style='".$row_style[$c]."'>\n";
|
||||
//echo "<tr>";
|
||||
//echo " <td valign='top'>Title</td>";
|
||||
//echo " <td valign='top'><a href='rssupdate.php?rss_uuid=".$row[rss_uuid]."'>".$row[rss_uuid]."</a></td>";
|
||||
//echo "</tr>";
|
||||
//echo "<td valign='top'>".$row[rss_category]."</td>";
|
||||
|
||||
echo "<tr>";
|
||||
echo " <td valign='top'>Title: </td>";
|
||||
echo " <td valign='top'><b>".$row[rss_title]."</b></td>";
|
||||
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 " </td>";
|
||||
$rss_description = $row[rss_description];
|
||||
//$rss_description = str_replace ("\r\n", "<br>", $rss_description);
|
||||
//$rss_description = str_replace ("\n", "<br>", $rss_description);
|
||||
echo "</tr>";
|
||||
|
||||
|
||||
echo "<tr>";
|
||||
echo " <td valign='top'>Template: </td>";
|
||||
echo " <td valign='top'>".$row[rss_sub_category]."</td>";
|
||||
echo "</tr>";
|
||||
|
||||
echo "<tr>";
|
||||
echo " <td valign='top'>Group: </td>";
|
||||
echo " <td valign='top'>".$row[rss_group]."</td>";
|
||||
echo "</tr>";
|
||||
|
||||
if (strlen($row[rss_order]) > 0) {
|
||||
echo "<tr>";
|
||||
echo " <td valign='top'>Order: </td>";
|
||||
echo " <td valign='top'>".$row[rss_order]."</td>";
|
||||
echo "</tr>";
|
||||
}
|
||||
|
||||
//echo "<td valign='top'>".$row[rss_link]."</td>";
|
||||
echo " <td valign='top'>Description: </td>";
|
||||
echo " <td valign='top' colspan='2'>".$rss_description."</td>";
|
||||
//echo "<td valign='top'>".$row[rss_img]."</td>";
|
||||
|
||||
//echo "<tr>";
|
||||
//echo " <td valign='top'>Priority: </td>";
|
||||
//echo " <td valign='top' colspan='2'>".$row[rss_optional_1]."</td>"; //priority
|
||||
//echo "</tr>";
|
||||
|
||||
//echo "<tr>";
|
||||
//echo " <td valign='top'>Status: </td>"; //completion status
|
||||
//echo " <td valign='top' colspan='2'>";
|
||||
//echo $row[rss_optional_2];
|
||||
//if ($row[rss_optional_2]=="100") {
|
||||
// echo "Complete";
|
||||
//}
|
||||
//else {
|
||||
// echo $row[rss_optional_2]."%";
|
||||
//}
|
||||
//echo "</td>"; //completion status
|
||||
//echo "<td valign='top'>".$row[rss_optional_3]."</td>";
|
||||
//echo "<td valign='top'>".$row[rss_optional_4]."</td>";
|
||||
//echo "<td valign='top'>".$row[rss_optional_5]."</td>";
|
||||
//echo "<td valign='top'>".$row[rss_add_date]."</td>";
|
||||
//echo "<td valign='top'>".$row[rss_add_user]."</td>";
|
||||
//echo "<tr>";
|
||||
//echo " <td valign='top'>";
|
||||
//echo " <a href='rsssublist.php?rss_uuid=".$row[rss_uuid]."'>Details</a>";
|
||||
//echo " <input type='button' class='btn' name='' onclick=\"window.location='rsssublist.php?rss_uuid=".$row[rss_uuid]."'\" value='Details'>";
|
||||
//echo " </td>";
|
||||
//echo "</tr>";
|
||||
|
||||
echo "</tr>";
|
||||
|
||||
//echo "<tr><td colspan='100%'><img src='/images/spacer.gif' width='100%' height='1' style='background-color: #BBBBBB;'></td></tr>\n";
|
||||
if ($c==0) { $c=1; } else { $c=0; }
|
||||
} //end foreach
|
||||
}
|
||||
echo "</table>";
|
||||
unset($sql, $prep_statement, $result);
|
||||
|
||||
|
||||
if ($rss_sub_show == 1) {
|
||||
|
||||
echo "<br><br><br>";
|
||||
echo "<b>$rss_sub_title</b><br>";
|
||||
|
||||
$sql = "";
|
||||
$sql .= "select * from v_rss_sub ";
|
||||
$sql .= "where domain_uuid = '$domain_uuid' ";
|
||||
$sql .= "and rss_uuid = '$rss_uuid' ";
|
||||
$sql .= "and length(rss_sub_del_date) = 0 ";
|
||||
$sql .= "or domain_uuid = '$domain_uuid' ";
|
||||
$sql .= "and rss_uuid = '$rss_uuid' ";
|
||||
$sql .= "and rss_sub_del_date is null ";
|
||||
if (strlen($order_by)> 0) { $sql .= "order by $order_by $order "; }
|
||||
//echo $sql;
|
||||
|
||||
$prep_statement = $db->prepare(check_sql($sql));
|
||||
$prep_statement->execute();
|
||||
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||
$result_count = count($result);
|
||||
|
||||
$c = 0;
|
||||
$row_style["0"] = "background-color: #F5F5DC;";
|
||||
$row_style["1"] = "background-color: #FFFFFF;";
|
||||
|
||||
echo "<div align='left'>\n";
|
||||
echo "<table width='100%' 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>";
|
||||
|
||||
if ($result_count == 0) { //no results
|
||||
echo "<tr><td> </td></tr>";
|
||||
}
|
||||
else { //received results
|
||||
|
||||
echo "<tr>";
|
||||
/*
|
||||
echo "<th nowrap> ";
|
||||
if (strlen($order_by)==0) {
|
||||
echo "<a href='?order_by=rss_sub_uuid&order=desc' title='ascending'>rss_sub_uuid</a>";
|
||||
}
|
||||
else {
|
||||
if ($order=="asc") {
|
||||
echo "<a href='?order_by=rss_sub_uuid&order=desc' title='ascending'>rss_sub_uuid</a>";
|
||||
}
|
||||
else {
|
||||
echo "<a href='?order_by=rss_sub_uuid&order=asc' title='descending'>rss_sub_uuid</a>";
|
||||
}
|
||||
}
|
||||
echo " </th>";
|
||||
|
||||
echo "<th nowrap> ";
|
||||
if (strlen($order_by)==0) {
|
||||
echo "<a href='?order_by=rss_uuid&order=desc' title='ascending'>rss_uuid</a>";
|
||||
}
|
||||
else {
|
||||
if ($order=="asc") {
|
||||
echo "<a href='?order_by=rss_uuid&order=desc' title='ascending'>rss_uuid</a>";
|
||||
}
|
||||
else {
|
||||
echo "<a href='?order_by=rss_uuid&order=asc' title='descending'>rss_uuid</a>";
|
||||
}
|
||||
}
|
||||
echo " </th>";
|
||||
|
||||
echo "<th nowrap> ";
|
||||
if (strlen($order_by)==0) {
|
||||
echo "<a href='?order_by=rss_sub_title&order=desc' title='ascending'>rss_sub_title</a>";
|
||||
}
|
||||
else {
|
||||
if ($order=="asc") {
|
||||
echo "<a href='?order_by=rss_sub_title&order=desc' title='ascending'>rss_sub_title</a>";
|
||||
}
|
||||
else {
|
||||
echo "<a href='?order_by=rss_sub_title&order=asc' title='descending'>rss_sub_title</a>";
|
||||
}
|
||||
}
|
||||
echo " </th>";
|
||||
|
||||
echo "<th nowrap> ";
|
||||
if (strlen($order_by)==0) {
|
||||
echo "<a href='?order_by=rss_sub_link&order=desc' title='ascending'>rss_sub_link</a>";
|
||||
}
|
||||
else {
|
||||
if ($order=="asc") {
|
||||
echo "<a href='?order_by=rss_sub_link&order=desc' title='ascending'>rss_sub_link</a>";
|
||||
}
|
||||
else {
|
||||
echo "<a href='?order_by=rss_sub_link&order=asc' title='descending'>rss_sub_link</a>";
|
||||
}
|
||||
}
|
||||
echo " </th>";
|
||||
|
||||
echo "<th nowrap> ";
|
||||
if (strlen($order_by)==0) {
|
||||
echo "<a href='?order_by=rss_sub_description&order=desc' title='ascending'>rss_sub_description</a>";
|
||||
}
|
||||
else {
|
||||
if ($order=="asc") {
|
||||
echo "<a href='?order_by=rss_sub_description&order=desc' title='ascending'>rss_sub_description</a>";
|
||||
}
|
||||
else {
|
||||
echo "<a href='?order_by=rss_sub_description&order=asc' title='descending'>rss_sub_description</a>";
|
||||
}
|
||||
}
|
||||
echo " </th>";
|
||||
|
||||
echo "<th nowrap> ";
|
||||
if (strlen($order_by)==0) {
|
||||
echo "<a href='?order_by=rss_sub_optional_1&order=desc' title='ascending'>rss_sub_optional_1</a>";
|
||||
}
|
||||
else {
|
||||
if ($order=="asc") {
|
||||
echo "<a href='?order_by=rss_sub_optional_1&order=desc' title='ascending'>rss_sub_optional_1</a>";
|
||||
}
|
||||
else {
|
||||
echo "<a href='?order_by=rss_sub_optional_1&order=asc' title='descending'>rss_sub_optional_1</a>";
|
||||
}
|
||||
}
|
||||
echo " </th>";
|
||||
|
||||
echo "<th nowrap> ";
|
||||
if (strlen($order_by)==0) {
|
||||
echo "<a href='?order_by=rss_sub_optional_2&order=desc' title='ascending'>rss_sub_optional_2</a>";
|
||||
}
|
||||
else {
|
||||
if ($order=="asc") {
|
||||
echo "<a href='?order_by=rss_sub_optional_2&order=desc' title='ascending'>rss_sub_optional_2</a>";
|
||||
}
|
||||
else {
|
||||
echo "<a href='?order_by=rss_sub_optional_2&order=asc' title='descending'>rss_sub_optional_2</a>";
|
||||
}
|
||||
}
|
||||
echo " </th>";
|
||||
|
||||
echo "<th nowrap> ";
|
||||
if (strlen($order_by)==0) {
|
||||
echo "<a href='?order_by=rss_sub_optional_3&order=desc' title='ascending'>rss_sub_optional_3</a>";
|
||||
}
|
||||
else {
|
||||
if ($order=="asc") {
|
||||
echo "<a href='?order_by=rss_sub_optional_3&order=desc' title='ascending'>rss_sub_optional_3</a>";
|
||||
}
|
||||
else {
|
||||
echo "<a href='?order_by=rss_sub_optional_3&order=asc' title='descending'>rss_sub_optional_3</a>";
|
||||
}
|
||||
}
|
||||
echo " </th>";
|
||||
|
||||
echo "<th nowrap> ";
|
||||
if (strlen($order_by)==0) {
|
||||
echo "<a href='?order_by=rss_sub_optional_4&order=desc' title='ascending'>rss_sub_optional_4</a>";
|
||||
}
|
||||
else {
|
||||
if ($order=="asc") {
|
||||
echo "<a href='?order_by=rss_sub_optional_4&order=desc' title='ascending'>rss_sub_optional_4</a>";
|
||||
}
|
||||
else {
|
||||
echo "<a href='?order_by=rss_sub_optional_4&order=asc' title='descending'>rss_sub_optional_4</a>";
|
||||
}
|
||||
}
|
||||
echo " </th>";
|
||||
|
||||
echo "<th nowrap> ";
|
||||
if (strlen($order_by)==0) {
|
||||
echo "<a href='?order_by=rss_sub_optional_5&order=desc' title='ascending'>rss_sub_optional_5</a>";
|
||||
}
|
||||
else {
|
||||
if ($order=="asc") {
|
||||
echo "<a href='?order_by=rss_sub_optional_5&order=desc' title='ascending'>rss_sub_optional_5</a>";
|
||||
}
|
||||
else {
|
||||
echo "<a href='?order_by=rss_sub_optional_5&order=asc' title='descending'>rss_sub_optional_5</a>";
|
||||
}
|
||||
}
|
||||
echo " </th>";
|
||||
|
||||
echo "<th nowrap> ";
|
||||
if (strlen($order_by)==0) {
|
||||
echo "<a href='?order_by=rss_sub_add_date&order=desc' title='ascending'>rss_sub_add_date</a>";
|
||||
}
|
||||
else {
|
||||
if ($order=="asc") {
|
||||
echo "<a href='?order_by=rss_sub_add_date&order=desc' title='ascending'>rss_sub_add_date</a>";
|
||||
}
|
||||
else {
|
||||
echo "<a href='?order_by=rss_sub_add_date&order=asc' title='descending'>rss_sub_add_date</a>";
|
||||
}
|
||||
}
|
||||
echo " </th>";
|
||||
|
||||
echo "<th nowrap> ";
|
||||
if (strlen($order_by)==0) {
|
||||
echo "<a href='?order_by=rss_sub_add_user&order=desc' title='ascending'>rss_sub_add_user</a>";
|
||||
}
|
||||
else {
|
||||
if ($order=="asc") {
|
||||
echo "<a href='?order_by=rss_sub_add_user&order=desc' title='ascending'>rss_sub_add_user</a>";
|
||||
}
|
||||
else {
|
||||
echo "<a href='?order_by=rss_sub_add_user&order=asc' title='descending'>rss_sub_add_user</a>";
|
||||
}
|
||||
}
|
||||
echo " </th>";
|
||||
*/
|
||||
|
||||
echo "</tr>";
|
||||
echo "<tr><td colspan='100%'><img src='/images/spacer.gif' width='100%' height='1' style='background-color: #BBBBBB;'></td></tr>\n";
|
||||
|
||||
foreach($result as $row) {
|
||||
//print_r( $row );
|
||||
echo "<tr style='".$row_style[$c]."'>\n";
|
||||
//echo "<td valign='top'>".$rss_uuid."</td>";
|
||||
//echo "<td valign='top'> <b>".$row[rss_sub_title]."</b> </td>";
|
||||
//echo "<td valign='top'> ".$row[rss_sub_link]." </td>";
|
||||
echo "<td valign='top' width='200'>";
|
||||
echo " <b>".$row[rss_sub_title]."</b>";
|
||||
echo "</td>";
|
||||
|
||||
echo "<td valign='top'>".$row[rss_sub_add_date]."</td>";
|
||||
|
||||
//echo "<td valign='top'>".$row[rss_sub_optional_1]."</td>";
|
||||
//echo "<td valign='top'>".$row[rss_sub_optional_2]."</td>";
|
||||
//echo "<td valign='top'>".$row[rss_sub_optional_3]."</td>";
|
||||
//echo "<td valign='top'>".$row[rss_sub_optional_4]."</td>";
|
||||
//echo "<td valign='top'>".$row[rss_sub_optional_5]."</td>";
|
||||
//echo "<td valign='top'>".$row[rss_sub_add_user]."</td>";
|
||||
|
||||
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 "</td>";
|
||||
|
||||
echo "<td valign='top' align='right'>";
|
||||
echo " ";
|
||||
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 " \n";
|
||||
//echo " <a href='rsssubupdate.php?rss_uuid=".$rss_uuid."&rss_sub_uuid=".$row[rss_sub_uuid]."'>Update</a> ";
|
||||
echo "</td>";
|
||||
|
||||
|
||||
$rss_sub_description = $row[rss_sub_description];
|
||||
$rss_sub_description = str_replace ("\r\n", "<br>", $rss_sub_description);
|
||||
$rss_sub_description = str_replace ("\n", "<br>", $rss_sub_description);
|
||||
|
||||
echo "</tr>";
|
||||
echo "<tr style='".$row_style[$c]."'>\n";
|
||||
echo "<td valign='top' width='300' colspan='4'>";
|
||||
echo "".$rss_sub_description." ";
|
||||
echo "</td>";
|
||||
|
||||
echo "</tr>";
|
||||
|
||||
|
||||
|
||||
echo "</tr>";
|
||||
|
||||
echo "<tr><td colspan='100%'><img src='/images/spacer.gif' width='100%' height='1' style='background-color: #BBBBBB;'></td></tr>\n";
|
||||
if ($c==0) { $c=1; } else { $c=0; }
|
||||
} //end foreach unset($sql, $result, $row_count);
|
||||
|
||||
|
||||
|
||||
} //end if results
|
||||
|
||||
echo "</table>\n";
|
||||
echo "</div>\n";
|
||||
|
||||
|
||||
} //if ($showrsssub == 1) {
|
||||
|
||||
echo " <br><br>";
|
||||
echo " </td>\n";
|
||||
echo "</tr>\n";
|
||||
echo "</table>\n";
|
||||
|
||||
//echo "<input type='button' class='btn' name='' onclick=\"window.location='rsssubsearch.php'\" value='Search'> \n";
|
||||
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'> \n";
|
||||
}
|
||||
echo "</div>";
|
||||
|
||||
echo "<br><br>";
|
||||
require_once "includes/footer.php";
|
||||
|
||||
unset ($result_count);
|
||||
unset ($result);
|
||||
unset ($key);
|
||||
unset ($val);
|
||||
unset ($c);
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,260 @@
|
||||
<?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>
|
||||
*/
|
||||
include "root.php";
|
||||
require_once "includes/require.php";
|
||||
require_once "includes/checkauth.php";
|
||||
require_once "config.php";
|
||||
if (permission_exists('content_view')) {
|
||||
//access granted
|
||||
}
|
||||
else {
|
||||
echo "access denied";
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
if (count($_POST)>0) {
|
||||
$rss_sub_uuid = check_str($_POST["rss_sub_uuid"]);
|
||||
$rss_uuid = check_str($_POST["rss_uuid"]);
|
||||
$rss_sub_title = check_str($_POST["rss_sub_title"]);
|
||||
$rss_sub_link = check_str($_POST["rss_sub_link"]);
|
||||
$rss_sub_description = check_str($_POST["rss_sub_description"]);
|
||||
$rss_sub_optional_1 = check_str($_POST["rss_sub_optional_1"]);
|
||||
$rss_sub_optional_2 = check_str($_POST["rss_sub_optional_2"]);
|
||||
$rss_sub_optional_3 = check_str($_POST["rss_sub_optional_3"]);
|
||||
$rss_sub_optional_4 = check_str($_POST["rss_sub_optional_4"]);
|
||||
$rss_sub_optional_5 = check_str($_POST["rss_sub_optional_5"]);
|
||||
$rss_sub_add_date = check_str($_POST["rss_sub_add_date"]);
|
||||
$rss_sub_add_user = check_str($_POST["rss_sub_add_user"]);
|
||||
|
||||
|
||||
require_once "includes/header.php";
|
||||
|
||||
echo "<div align='center'>";
|
||||
echo "<table border='0' cellpadding='0' cellspacing='2'>\n";
|
||||
|
||||
echo "<tr class='border'>\n";
|
||||
echo " <td align=\"left\">\n";
|
||||
echo " <br>";
|
||||
|
||||
|
||||
$sql = "";
|
||||
$sql .= "select * from v_rss_sub ";
|
||||
$sql .= "where ";
|
||||
if (strlen($domain_uuid) > 0) { $sql .= "and rss_sub_uuid = '$domain_uuid' "; }
|
||||
if (strlen($rss_sub_uuid) > 0) { $sql .= "and rss_sub_uuid like '%$rss_sub_uuid%' "; }
|
||||
if (strlen($rss_uuid) > 0) { $sql .= "and rss_uuid like '%$rss_uuid%' "; }
|
||||
if (strlen($rss_sub_title) > 0) { $sql .= "and rss_sub_title like '%$rss_sub_title%' "; }
|
||||
if (strlen($rss_sub_link) > 0) { $sql .= "and rss_sub_link like '%$rss_sub_link%' "; }
|
||||
if (strlen($rss_sub_description) > 0) { $sql .= "and rss_sub_description like '%$rss_sub_description%' "; }
|
||||
if (strlen($rss_sub_optional_1) > 0) { $sql .= "and rss_sub_optional_1 like '%$rss_sub_optional_1%' "; }
|
||||
if (strlen($rss_sub_optional_2) > 0) { $sql .= "and rss_sub_optional_2 like '%$rss_sub_optional_2%' "; }
|
||||
if (strlen($rss_sub_optional_3) > 0) { $sql .= "and rss_sub_optional_3 like '%$rss_sub_optional_3%' "; }
|
||||
if (strlen($rss_sub_optional_4) > 0) { $sql .= "and rss_sub_optional_4 like '%$rss_sub_optional_4%' "; }
|
||||
if (strlen($rss_sub_optional_5) > 0) { $sql .= "and rss_sub_optional_5 like '%$rss_sub_optional_5%' "; }
|
||||
if (strlen($rss_sub_add_date) > 0) { $sql .= "and rss_sub_add_date like '%$rss_sub_add_date%' "; }
|
||||
if (strlen($rss_sub_add_user) > 0) { $sql .= "and rss_sub_add_user like '%$rss_sub_add_user%' "; }
|
||||
$sql .= "and length(rss_sub_del_date) = 0 ";
|
||||
$sql .= "or ";
|
||||
if (strlen($domain_uuid) > 0) { $sql .= "and rss_sub_uuid = '$domain_uuid' "; }
|
||||
if (strlen($rss_sub_uuid) > 0) { $sql .= "and rss_sub_uuid like '%$rss_sub_uuid%' "; }
|
||||
if (strlen($rss_uuid) > 0) { $sql .= "and rss_uuid like '%$rss_uuid%' "; }
|
||||
if (strlen($rss_sub_title) > 0) { $sql .= "and rss_sub_title like '%$rss_sub_title%' "; }
|
||||
if (strlen($rss_sub_link) > 0) { $sql .= "and rss_sub_link like '%$rss_sub_link%' "; }
|
||||
if (strlen($rss_sub_description) > 0) { $sql .= "and rss_sub_description like '%$rss_sub_description%' "; }
|
||||
if (strlen($rss_sub_optional_1) > 0) { $sql .= "and rss_sub_optional_1 like '%$rss_sub_optional_1%' "; }
|
||||
if (strlen($rss_sub_optional_2) > 0) { $sql .= "and rss_sub_optional_2 like '%$rss_sub_optional_2%' "; }
|
||||
if (strlen($rss_sub_optional_3) > 0) { $sql .= "and rss_sub_optional_3 like '%$rss_sub_optional_3%' "; }
|
||||
if (strlen($rss_sub_optional_4) > 0) { $sql .= "and rss_sub_optional_4 like '%$rss_sub_optional_4%' "; }
|
||||
if (strlen($rss_sub_optional_5) > 0) { $sql .= "and rss_sub_optional_5 like '%$rss_sub_optional_5%' "; }
|
||||
if (strlen($rss_sub_add_date) > 0) { $sql .= "and rss_sub_add_date like '%$rss_sub_add_date%' "; }
|
||||
if (strlen($rss_sub_add_user) > 0) { $sql .= "and rss_sub_add_user like '%$rss_sub_add_user%' "; }
|
||||
$sql .= "and rss_sub_del_date is null ";
|
||||
|
||||
$sql = trim($sql);
|
||||
if (substr($sql, -5) == "where"){ $sql = substr($sql, 0, (strlen($sql)-5)); }
|
||||
if (substr($sql, -3) == " or"){ $sql = substr($sql, 0, (strlen($sql)-5)); }
|
||||
$sql = str_replace ("where and", "where", $sql);
|
||||
$sql = str_replace ("or and", "or", $sql);
|
||||
|
||||
$prep_statement = $db->prepare(check_sql($sql));
|
||||
$prep_statement->execute();
|
||||
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||
$result_count = count($result);
|
||||
|
||||
$c = 0;
|
||||
$row_style["0"] = "background-color: #F5F5DC;";
|
||||
$row_style["1"] = "background-color: #FFFFFF;";
|
||||
|
||||
echo "<b>Search Results</b><br>";
|
||||
echo "<div align='left'>\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>";
|
||||
|
||||
if ($result_count == 0) { //no results
|
||||
echo "<tr><td> </td></tr>";
|
||||
}
|
||||
else { //received results
|
||||
|
||||
echo "<tr>";
|
||||
echo "<th nowrap> Sub ID </th>";
|
||||
echo "<th nowrap> Id </th>";
|
||||
echo "<th nowrap> Title </th>";
|
||||
//echo "<th nowrap> Link </th>";
|
||||
//echo "<th nowrap> rss_sub_description </th>";
|
||||
//echo "<th nowrap> rss_sub_optional_1 </th>";
|
||||
//echo "<th nowrap> rss_sub_optional_2 </th>";
|
||||
//echo "<th nowrap> rss_sub_optional_3 </th>";
|
||||
//echo "<th nowrap> rss_sub_optional_4 </th>";
|
||||
//echo "<th nowrap> rss_sub_optional_5 </th>";
|
||||
//echo "<th nowrap> rss_sub_add_date </th>";
|
||||
//echo "<th nowrap> rss_sub_add_user </th>";
|
||||
echo "</tr>";
|
||||
echo "<tr><td colspan='100%'><img src='/images/spacer.gif' width='100%' height='1' style='background-color: #BBBBBB;'></td></tr>\n";
|
||||
|
||||
foreach($result as $row) {
|
||||
//print_r( $row );
|
||||
echo "<tr style='".$row_style[$c]."'>\n";
|
||||
echo "<td valign='top'><a href='rsssubupdate.php?rss_sub_uuid=".$row[rss_sub_uuid]."'>".$row[rss_sub_uuid]."</a></td>";
|
||||
echo "<td valign='top'>".$row[rss_uuid]."</td>";
|
||||
echo "<td valign='top'>".$row[rss_sub_title]."</td>";
|
||||
//echo "<td valign='top'>".$row[rss_sub_link]."</td>";
|
||||
//echo "<td valign='top'>".$row[rss_sub_description]."</td>";
|
||||
//echo "<td valign='top'>".$row[rss_sub_optional_1]."</td>";
|
||||
//echo "<td valign='top'>".$row[rss_sub_optional_2]."</td>";
|
||||
//echo "<td valign='top'>".$row[rss_sub_optional_3]."</td>";
|
||||
//echo "<td valign='top'>".$row[rss_sub_optional_4]."</td>";
|
||||
//echo "<td valign='top'>".$row[rss_sub_optional_5]."</td>";
|
||||
//echo "<td valign='top'>".$row[rss_sub_add_date]."</td>";
|
||||
//echo "<td valign='top'>".$row[rss_sub_add_user]."</td>";
|
||||
echo "</tr>";
|
||||
|
||||
echo "<tr><td colspan='100%'><img src='/images/spacer.gif' width='100%' height='1' style='background-color: #BBBBBB;'></td></tr>\n";
|
||||
if ($c==0) { $c=1; } else { $c=0; }
|
||||
} //end foreach
|
||||
unset($sql, $result, $row_count);
|
||||
|
||||
echo "</table>\n";
|
||||
echo "</div>\n";
|
||||
|
||||
|
||||
echo " <br><br>";
|
||||
echo " </td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
} //end if results
|
||||
|
||||
echo "</table>\n";
|
||||
echo "</div>";
|
||||
|
||||
echo "<br><br>";
|
||||
require_once "includes/footer.php";
|
||||
|
||||
unset ($result_count);
|
||||
unset ($result);
|
||||
unset ($key);
|
||||
unset ($val);
|
||||
unset ($c);
|
||||
|
||||
}
|
||||
else {
|
||||
|
||||
echo "\n"; require_once "includes/header.php";
|
||||
echo "<div align='center'>";
|
||||
echo "<table border='0' cellpadding='0' cellspacing='2'>\n";
|
||||
|
||||
echo "<tr class='border'>\n";
|
||||
echo " <td align=\"left\">\n";
|
||||
echo " <br>";
|
||||
|
||||
|
||||
echo "<form method='post' action=''>";
|
||||
echo "<table>";
|
||||
echo " <tr>";
|
||||
echo " <td>Sub ID:</td>";
|
||||
echo " <td><input type='text' class='txt' name='rss_sub_uuid'></td>";
|
||||
echo " </tr>";
|
||||
echo " <tr>";
|
||||
echo " <td>ID:</td>";
|
||||
echo " <td><input type='text' class='txt' name='rss_uuid'></td>";
|
||||
echo " </tr>";
|
||||
echo " <tr>";
|
||||
echo " <td>Sub Title:</td>";
|
||||
echo " <td><input type='text' class='txt' name='rss_sub_title'></td>";
|
||||
echo " </tr>";
|
||||
echo " <tr>";
|
||||
echo " <td>Sub Link:</td>";
|
||||
echo " <td><input type='text' class='txt' name='rss_sub_link'></td>";
|
||||
echo " </tr>";
|
||||
echo " <tr>";
|
||||
echo " <td>Sub Desc:</td>";
|
||||
echo " <td><input type='text' class='txt' name='rss_sub_description'></td>";
|
||||
echo " </tr>";
|
||||
//echo " <tr>";
|
||||
//echo " <td>rss_sub_optional_1:</td>";
|
||||
//echo " <td><input type='text' class='txt' name='rss_sub_optional_1'></td>";
|
||||
//echo " </tr>";
|
||||
//echo " <tr>";
|
||||
//echo " <td>rss_sub_optional_2:</td>";
|
||||
//echo " <td><input type='text' class='txt' name='rss_sub_optional_2'></td>";
|
||||
//echo " </tr>";
|
||||
//echo " <tr>";
|
||||
//echo " <td>rss_sub_optional_3:</td>";
|
||||
//echo " <td><input type='text' class='txt' name='rss_sub_optional_3'></td>";
|
||||
//echo " </tr>";
|
||||
//echo " <tr>";
|
||||
//echo " <td>rss_sub_optional_4:</td>";
|
||||
//echo " <td><input type='text' class='txt' name='rss_sub_optional_4'></td>";
|
||||
//echo " </tr>";
|
||||
//echo " <tr>";
|
||||
//echo " <td>rss_sub_optional_5:</td>";
|
||||
//echo " <td><input type='text' class='txt' name='rss_sub_optional_5'></td>";
|
||||
//echo " </tr>";
|
||||
//echo " <tr>";
|
||||
//echo " <td>rss_sub_add_date:</td>";
|
||||
//echo " <td><input type='text' class='txt' name='rss_sub_add_date'></td>";
|
||||
//echo " </tr>";
|
||||
//echo " <tr>";
|
||||
//echo " <td>rss_sub_add_user:</td>";
|
||||
//echo " <td><input type='text' class='txt' name='rss_sub_add_user'></td>";
|
||||
//echo " </tr>";
|
||||
echo " <tr>";
|
||||
echo " <td colspan='2' align='right'><input type='submit' name='submit' class='btn' value='Search'></td>";
|
||||
echo " </tr>";
|
||||
echo "</table>";
|
||||
echo "</form>";
|
||||
|
||||
|
||||
echo " </td>";
|
||||
echo " </tr>";
|
||||
echo "</table>";
|
||||
echo "</div>";
|
||||
|
||||
|
||||
require_once "includes/footer.php";
|
||||
|
||||
} //end if not post
|
||||
?>
|
||||
@@ -0,0 +1,206 @@
|
||||
<?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>
|
||||
*/
|
||||
include "root.php";
|
||||
require_once "includes/require.php";
|
||||
require_once "includes/checkauth.php";
|
||||
require_once "config.php";
|
||||
if (permission_exists('content_edit')) {
|
||||
//access granted
|
||||
}
|
||||
else {
|
||||
echo "access denied";
|
||||
exit;
|
||||
}
|
||||
|
||||
$rss_uuid = $_GET["rss_uuid"];
|
||||
|
||||
if (count($_POST)>0 && $_POST["persistform"] == "0") {
|
||||
$rss_sub_uuid = check_str($_POST["rss_sub_uuid"]);
|
||||
$rss_uuid = check_str($_POST["rss_uuid"]);
|
||||
$rss_sub_title = check_str($_POST["rss_sub_title"]);
|
||||
$rss_sub_link = check_str($_POST["rss_sub_link"]);
|
||||
$rss_sub_description = check_str($_POST["rss_sub_description"]);
|
||||
$rss_sub_optional_1 = check_str($_POST["rss_sub_optional_1"]);
|
||||
$rss_sub_optional_2 = check_str($_POST["rss_sub_optional_2"]);
|
||||
$rss_sub_optional_3 = check_str($_POST["rss_sub_optional_3"]);
|
||||
$rss_sub_optional_4 = check_str($_POST["rss_sub_optional_4"]);
|
||||
$rss_sub_optional_5 = check_str($_POST["rss_sub_optional_5"]);
|
||||
$rss_sub_add_date = check_str($_POST["rss_sub_add_date"]);
|
||||
$rss_sub_add_user = check_str($_POST["rss_sub_add_user"]);
|
||||
|
||||
$msg = '';
|
||||
if (strlen($rss_uuid) == 0) { $msg .= "Error missing rss_uuid.<br>\n"; }
|
||||
if (strlen($rss_sub_uuid) == 0) { $msg .= "Error missing rss_sub_uuid.<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($msg) > 0) {
|
||||
require_once "includes/persistform.php";
|
||||
require_once "includes/header.php";
|
||||
echo "<div align='center' style='' >";
|
||||
echo "<table>";
|
||||
echo "<tr>";
|
||||
echo "<td>";
|
||||
echo " <div class='borderlight' align='left' style='padding:10px;'>";
|
||||
echo " $msg";
|
||||
echo " <br>";
|
||||
echo " <div align='center'>".persistform($_POST)."</div>";
|
||||
echo " </div>";
|
||||
echo "</td>";
|
||||
echo "</tr>";
|
||||
echo "</table>";
|
||||
echo "</div>";
|
||||
|
||||
require_once "includes/footer.php";
|
||||
return;
|
||||
}
|
||||
|
||||
//sql update
|
||||
$sql = "update v_rss_sub set ";
|
||||
//$sql .= "rss_uuid = '$rss_uuid', ";
|
||||
$sql .= "rss_sub_title = '$rss_sub_title', ";
|
||||
$sql .= "rss_sub_link = '$rss_sub_link', ";
|
||||
$sql .= "rss_sub_description = '$rss_sub_description', ";
|
||||
$sql .= "rss_sub_optional_1 = '$rss_sub_optional_1', ";
|
||||
$sql .= "rss_sub_optional_2 = '$rss_sub_optional_2', ";
|
||||
$sql .= "rss_sub_optional_3 = '$rss_sub_optional_3', ";
|
||||
$sql .= "rss_sub_optional_4 = '$rss_sub_optional_4', ";
|
||||
$sql .= "rss_sub_optional_5 = '$rss_sub_optional_5' ";
|
||||
//$sql .= "rss_sub_add_date = now(), ";
|
||||
//$sql .= "rss_sub_add_user = '".$_SESSION["username"]."' ";
|
||||
$sql .= "where domain_uuid = '$domain_uuid' ";
|
||||
$sql .= "and rss_sub_uuid = '$rss_sub_uuid' ";
|
||||
//$sql .= "and rss_uuid = '$rss_uuid' ";
|
||||
$count = $db->exec(check_sql($sql));
|
||||
//echo "Affected Rows: ".$count;
|
||||
|
||||
//edit: make sure the meta redirect url is correct
|
||||
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 "<div align='center'>";
|
||||
echo "Update Complete";
|
||||
echo "</div>";
|
||||
require_once "includes/footer.php";
|
||||
return;
|
||||
}
|
||||
else {
|
||||
//get data from the db
|
||||
$rss_sub_uuid = $_GET["rss_sub_uuid"];
|
||||
|
||||
$sql = "";
|
||||
$sql .= "select * from v_rss_sub ";
|
||||
$sql .= "where domain_uuid = '$domain_uuid' ";
|
||||
$sql .= "and rss_sub_uuid = '$rss_sub_uuid' ";
|
||||
$prep_statement = $db->prepare(check_sql($sql));
|
||||
$prep_statement->execute();
|
||||
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||
foreach ($result as &$row) {
|
||||
//$rss_uuid = $row["rss_uuid"];
|
||||
$rss_sub_title = $row["rss_sub_title"];
|
||||
$rss_sub_link = $row["rss_sub_link"];
|
||||
$rss_sub_description = $row["rss_sub_description"];
|
||||
$rss_sub_optional_1 = $row["rss_sub_optional_1"];
|
||||
$rss_sub_optional_2 = $row["rss_sub_optional_2"];
|
||||
$rss_sub_optional_3 = $row["rss_sub_optional_3"];
|
||||
$rss_sub_optional_4 = $row["rss_sub_optional_4"];
|
||||
$rss_sub_optional_5 = $row["rss_sub_optional_5"];
|
||||
$rss_sub_add_date = $row["rss_sub_add_date"];
|
||||
$rss_sub_add_user = $row["rss_sub_add_user"];
|
||||
break; //limit to 1 row
|
||||
}
|
||||
}
|
||||
|
||||
//show the header
|
||||
require_once "includes/header.php";
|
||||
require_once "includes/wysiwyg.php";
|
||||
|
||||
//show the content
|
||||
echo "<div align='center'>";
|
||||
echo "<table border='0' cellpadding='0' cellspacing='2'>\n";
|
||||
echo "<tr class='border'>\n";
|
||||
echo " <td align=\"left\">\n";
|
||||
echo " <br>";
|
||||
|
||||
echo "<form method='post' action=''>";
|
||||
echo "<table width='100%'>";
|
||||
//echo " <tr>";
|
||||
//echo " <td>rss_uuid:</td>";
|
||||
//echo " <td><input type='text' name='rss_uuid' class='txt' value='$rss_uuid'></td>";
|
||||
//echo " </tr>";
|
||||
echo " <tr>";
|
||||
echo " <td nowrap>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 " <td>Sub Link:</td>";
|
||||
echo " <td><input type='text' name='rss_sub_link' class='txt' value='$rss_sub_link'></td>";
|
||||
echo " </tr>";
|
||||
echo " <tr>";
|
||||
echo " <td valign='top'>Description:</td>";
|
||||
echo " <td>";
|
||||
echo " <textarea name='rss_sub_description' rows='12' class='txt'>$rss_sub_description</textarea>";
|
||||
echo " </td>";
|
||||
echo " </tr>";
|
||||
//echo " <tr>";
|
||||
//echo " <td>rss_sub_optional_1:</td>";
|
||||
//echo " <td><input type='text' name='rss_sub_optional_1' value='$rss_sub_optional_1'></td>";
|
||||
//echo " </tr>";
|
||||
//echo " <tr>";
|
||||
//echo " <td>rss_sub_optional_2:</td>";
|
||||
//echo " <td><input type='text' name='rss_sub_optional_2' value='$rss_sub_optional_2'></td>";
|
||||
//echo " </tr>";
|
||||
//echo " <tr>";
|
||||
//echo " <td>rss_sub_optional_3:</td>";
|
||||
//echo " <td><input type='text' name='rss_sub_optional_3' value='$rss_sub_optional_3'></td>";
|
||||
//echo " </tr>";
|
||||
//echo " <tr>";
|
||||
//echo " <td>rss_sub_optional_4:</td>";
|
||||
//echo " <td><input type='text' name='rss_sub_optional_4' value='$rss_sub_optional_4'></td>";
|
||||
//echo " </tr>";
|
||||
//echo " <tr>";
|
||||
//echo " <td>rss_sub_optional_5:</td>";
|
||||
//echo " <td><input type='text' name='rss_sub_optional_5' value='$rss_sub_optional_5'></td>";
|
||||
//echo " </tr>";
|
||||
|
||||
echo " <tr>";
|
||||
echo " <td colspan='2' align='right'>";
|
||||
echo " <input type='hidden' name='rss_uuid' value='$rss_uuid'>";
|
||||
echo " <input type='hidden' name='persistform' value='0'>";
|
||||
echo " <input type='hidden' name='rss_sub_uuid' value='$rss_sub_uuid'>";
|
||||
echo " <input type='submit' name='submit' class='btn' value='Update'>";
|
||||
echo " </td>";
|
||||
echo " </tr>";
|
||||
echo "</table>";
|
||||
echo "</form>";
|
||||
|
||||
echo " </td>";
|
||||
echo " </tr>";
|
||||
echo "</table>";
|
||||
echo "</div>";
|
||||
|
||||
//show the footer
|
||||
require_once "includes/footer.php";
|
||||
?>
|
||||
@@ -0,0 +1,392 @@
|
||||
<?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>
|
||||
*/
|
||||
include "root.php";
|
||||
require_once "includes/require.php";
|
||||
require_once "includes/checkauth.php";
|
||||
require_once "config.php";
|
||||
if (permission_exists('content_edit')) {
|
||||
//access granted
|
||||
}
|
||||
else {
|
||||
echo "access denied";
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
if (count($_POST)>0) {
|
||||
$rss_uuid = check_str($_POST["rss_uuid"]);
|
||||
//$rss_category = check_str($_POST["rss_category"]); //defined in local config.php
|
||||
$rss_sub_category = check_str($_POST["rss_sub_category"]);
|
||||
$rss_title = check_str($_POST["rss_title"]);
|
||||
$rss_link = check_str($_POST["rss_link"]);
|
||||
$rss_description = check_str($_POST["rss_description"]);
|
||||
$rss_group = check_str($_POST["rss_group"]);
|
||||
$rss_order = check_str($_POST["rss_order"]);
|
||||
|
||||
//$rss_description = str_replace ("<br />\r\n<br />", "<br />", $rss_description);
|
||||
//$rss_description = str_replace ("<br />\n<br />", "<br />", $rss_description);
|
||||
//$rss_description = str_replace ("<p>", "", $rss_description);
|
||||
//$rss_description = str_replace ("</p>", "<br />", $rss_description);
|
||||
|
||||
$rss_img = check_str($_POST["rss_img"]);
|
||||
$rss_optional_1 = check_str($_POST["rss_optional_1"]);
|
||||
$rss_optional_2 = check_str($_POST["rss_optional_2"]);
|
||||
//$rss_optional_3 = check_str($_POST["rss_optional_3"]);
|
||||
//$rss_optional_4 = check_str($_POST["rss_optional_4"]);
|
||||
//$rss_optional_5 = check_str($_POST["rss_optional_5"]);
|
||||
|
||||
//sql update
|
||||
$sql = "update v_rss set ";
|
||||
$sql .= "rss_sub_category = '$rss_sub_category', ";
|
||||
$sql .= "rss_title = '$rss_title', ";
|
||||
$sql .= "rss_link = '$rss_link', ";
|
||||
$sql .= "rss_description = '$rss_description', ";
|
||||
$sql .= "rss_img = '$rss_img', ";
|
||||
$sql .= "rss_optional_1 = '$rss_optional_1', ";
|
||||
$sql .= "rss_optional_2 = '$rss_optional_2', ";
|
||||
//$sql .= "rss_optional_3 = '$rss_optional_3', ";
|
||||
//$sql .= "rss_optional_4 = '$rss_optional_4', ";
|
||||
//$sql .= "rss_optional_5 = '$rss_optional_5', ";
|
||||
//$sql .= "rss_add_date = '$rss_add_date', ";
|
||||
$sql .= "rss_group = '$rss_group', ";
|
||||
$sql .= "rss_order = '$rss_order' ";
|
||||
$sql .= "where domain_uuid = '$domain_uuid' ";
|
||||
$sql .= "and rss_uuid = '$rss_uuid' ";
|
||||
$sql .= "and rss_category = '$rss_category' ";
|
||||
//echo $sql;
|
||||
//return;
|
||||
$count = $db->exec(check_sql($sql));
|
||||
//echo $sql."<br>";
|
||||
//echo "Affected Rows: ".$count;
|
||||
//exit;
|
||||
|
||||
//edit: make sure the meta redirect url is correct
|
||||
require_once "includes/header.php";
|
||||
echo "<meta http-equiv=\"refresh\" content=\"2;url=rsslist.php\">\n";
|
||||
echo "<div align='center'>";
|
||||
echo "Update Complete";
|
||||
echo "</div>";
|
||||
require_once "includes/footer.php";
|
||||
return;
|
||||
}
|
||||
else {
|
||||
//get data from the db
|
||||
$rss_uuid = $_GET["rss_uuid"];
|
||||
|
||||
$sql = "";
|
||||
$sql .= "select * from v_rss ";
|
||||
$sql .= "where domain_uuid = '$domain_uuid' ";
|
||||
$sql .= "and rss_uuid = '$rss_uuid' ";
|
||||
$prep_statement = $db->prepare(check_sql($sql));
|
||||
$prep_statement->execute();
|
||||
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||
foreach ($result as &$row) {
|
||||
$rss_category = $row["rss_category"];
|
||||
$rss_sub_category = $row["rss_sub_category"];
|
||||
$rss_optional_1 = $row["rss_optional_1"];
|
||||
$rss_title = $row["rss_title"];
|
||||
$rss_link = $row["rss_link"];
|
||||
$rss_description = $row["rss_description"];
|
||||
|
||||
if ($rss_optional_1 == "text/html") { //type
|
||||
$rss_description = htmlentities($rss_description);
|
||||
}
|
||||
|
||||
$rss_img = $row["rss_img"];
|
||||
$rss_optional_2 = $row["rss_optional_2"];
|
||||
$rss_optional_3 = $row["rss_optional_3"];
|
||||
$rss_optional_4 = $row["rss_optional_4"];
|
||||
$rss_optional_5 = $row["rss_optional_5"];
|
||||
$rss_add_date = $row["rss_add_date"];
|
||||
$rss_add_user = $row["rss_add_user"];
|
||||
$rss_group = $row["rss_group"];
|
||||
$rss_order = $row["rss_order"];
|
||||
//$rss_description = str_replace ("\r\n", "<br>", $rss_description);
|
||||
|
||||
//echo $rss_description;
|
||||
//return;
|
||||
|
||||
break; //limit to 1 row
|
||||
}
|
||||
}
|
||||
|
||||
require_once "includes/header.php";
|
||||
if (is_dir($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/includes/tiny_mce')) {
|
||||
if ($rss_optional_1 == "text/html") {
|
||||
require_once "includes/wysiwyg.php";
|
||||
}
|
||||
}
|
||||
else {
|
||||
//--- Begin: Edit Area -----------------------------------------------------
|
||||
echo " <script language=\"javascript\" type=\"text/javascript\" src=\"".PROJECT_PATH."/includes/edit_area/edit_area_full.js\"></script>\n";
|
||||
echo " <!-- -->\n";
|
||||
|
||||
echo " <script language=\"Javascript\" type=\"text/javascript\">\n";
|
||||
echo " editAreaLoader.init({\n";
|
||||
echo " id: \"rss_description\" // id of the textarea to transform //, |, help\n";
|
||||
echo " ,start_highlight: true\n";
|
||||
echo " ,font_size: \"8\"\n";
|
||||
echo " ,allow_toggle: false\n";
|
||||
echo " ,language: \"en\"\n";
|
||||
echo " ,syntax: \"html\"\n";
|
||||
echo " ,toolbar: \"search, go_to_line,|, fullscreen, |, undo, redo, |, select_font, |, syntax_selection, |, change_smooth_selection, highlight, reset_highlight, |, help\" //new_document,\n";
|
||||
echo " ,plugins: \"charmap\"\n";
|
||||
echo " ,charmap_default: \"arrows\"\n";
|
||||
echo " });\n";
|
||||
echo " </script>";
|
||||
//--- End: Edit Area -------------------------------------------------------
|
||||
}
|
||||
|
||||
echo "<div align='center'>";
|
||||
echo "<table border='0' width='90%' cellpadding='0' cellspacing='0'>\n";
|
||||
|
||||
echo "<tr class='border'>\n";
|
||||
echo " <td align=\"left\" width='100%'>\n";
|
||||
//echo " <br>";
|
||||
|
||||
|
||||
echo "<form method='post' action=''>";
|
||||
echo "<table width='100%' cellpadding='6' cellspacing='0'>";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td width='30%' nowrap valign='top'><b>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 "</tr>\n";
|
||||
|
||||
//echo " <tr>";
|
||||
//echo " <td class='vncellreq'>Category:</td>";
|
||||
//echo " <td class='vtable'><input type='text' class='formfld' name='rss_category' value='$rss_category'></td>";
|
||||
//echo " </tr>";
|
||||
//echo " <tr>";
|
||||
//echo " <td class='vncellreq' nowrap>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 " <td width='30%' class='vncellreq' nowrap>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 " <td class='vncellreq'>Link:</td>";
|
||||
echo " <td class='vtable'><input type='text' class='formfld' name='rss_link' value='$rss_link'></td>";
|
||||
echo " </tr>";
|
||||
|
||||
echo " <tr>";
|
||||
echo " <td class='vncellreq'>Group:</td>";
|
||||
echo " <td class='vtable'>";
|
||||
//echo " <input type='text' class='formfld' name='menuparentid' value='$menuparentid'>";
|
||||
|
||||
//---- Begin Select List --------------------
|
||||
$sql = "SELECT * FROM v_groups ";
|
||||
$sql .= "where domain_uuid = '$domain_uuid' ";
|
||||
$prep_statement = $db->prepare(check_sql($sql));
|
||||
$prep_statement->execute();
|
||||
|
||||
echo "<select name=\"rss_group\" class='formfld'>\n";
|
||||
echo "<option value=\"\">public</option>\n";
|
||||
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||
//$count = count($result);
|
||||
foreach($result as $field) {
|
||||
if ($rss_group == $field[group_name]) {
|
||||
echo "<option value='".$field[group_name]."' selected>".$field[group_name]."</option>\n";
|
||||
}
|
||||
else {
|
||||
echo "<option value='".$field[group_name]."'>".$field[group_name]."</option>\n";
|
||||
}
|
||||
}
|
||||
|
||||
echo "</select>";
|
||||
unset($sql, $result);
|
||||
//---- End Select List --------------------
|
||||
|
||||
echo " </td>";
|
||||
echo " </tr>";
|
||||
|
||||
/*
|
||||
echo " <tr>\n";
|
||||
echo " <td width='20%' class=\"vncell\" style='text-align: left;'>\n";
|
||||
echo " Template: \n";
|
||||
echo " </td>\n";
|
||||
echo " <td class=\"vtable\">\n";
|
||||
echo "<select id='rss_sub_category' name='rss_sub_category' class='formfld' style=''>\n";
|
||||
echo "<option value=''></option>\n";
|
||||
$theme_dir = $_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/themes';
|
||||
if ($handle = opendir($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/themes')) {
|
||||
while (false !== ($file = readdir($handle))) {
|
||||
if ($file != "." && $file != ".." && $file != ".svn" && is_dir($theme_dir.'/'.$file)) {
|
||||
if ($file == $rss_sub_category) {
|
||||
echo "<option value='$file' selected='selected'>$file</option>\n";
|
||||
}
|
||||
else {
|
||||
echo "<option value='$file'>$file</option>\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
closedir($handle);
|
||||
}
|
||||
echo " </select>\n";
|
||||
echo " <br />\n";
|
||||
echo " Select a template to set as the default and then press save.<br />\n";
|
||||
echo " </td>\n";
|
||||
echo " </tr>\n";
|
||||
*/
|
||||
|
||||
echo " <tr>";
|
||||
echo " <td class='vncellreq'>Type:</td>";
|
||||
echo " <td class='vtable'>";
|
||||
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"; }
|
||||
else { echo "<option value=\"text/html\">text/html</option>\n"; }
|
||||
|
||||
if ($rss_optional_1 == "text/javascript") { echo "<option value=\"text/javascript\" selected>text/javascript</option>\n"; }
|
||||
else { echo "<option value=\"text/javascript\">text/javascript</option>\n"; }
|
||||
echo " </select>";
|
||||
echo " </td>";
|
||||
echo " </tr>";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " Order:\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <select name='rss_order' class='formfld'>\n";
|
||||
if (strlen(htmlspecialchars($rss_order))> 0) {
|
||||
echo " <option selected='yes' value='".htmlspecialchars($rss_order)."'>".htmlspecialchars($rss_order)."</option>\n";
|
||||
}
|
||||
$i=0;
|
||||
while($i<=999) {
|
||||
if (strlen($i) == 1) {
|
||||
echo " <option value='00$i'>00$i</option>\n";
|
||||
}
|
||||
if (strlen($i) == 2) {
|
||||
echo " <option value='0$i'>0$i</option>\n";
|
||||
}
|
||||
if (strlen($i) == 3) {
|
||||
echo " <option value='$i'>$i</option>\n";
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
echo " </select>\n";
|
||||
echo "<br />\n";
|
||||
echo "\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo " <tr>";
|
||||
echo " <td class='' colspan='2' align='left'>";
|
||||
echo " <strong>Content:</strong> ";
|
||||
if ($rss_optional_1 == "text/html") {
|
||||
if (is_dir($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/includes/tiny_mce')) {
|
||||
echo " editor <a href='#' title='toggle' onclick=\"toogleEditorMode('rss_description'); return false;\">on/off</a><br>";
|
||||
}
|
||||
echo " <textarea name='rss_description' id='rss_description' class='formfld' cols='20' style='width: 100%' rows='12' >$rss_description</textarea>";
|
||||
}
|
||||
if ($rss_optional_1 == "text/javascript") {
|
||||
echo " <textarea name='rss_description' id='rss_description' class='formfld' cols='20' style='width: 100%' rows='12' ></textarea>";
|
||||
}
|
||||
echo " </td>";
|
||||
echo " </tr>";
|
||||
|
||||
//echo " <tr>";
|
||||
//echo " <td class='vncellreq'>Image:</td>";
|
||||
//echo " <td class='vtable'><input type='text' name='rss_img' value='$rss_img'></td>";
|
||||
//echo " </tr>";
|
||||
//echo " <tr>";
|
||||
//echo " <td class='vncellreq'>Priority:</td>";
|
||||
//echo " <td class='vtable'>";
|
||||
//echo " <input type='text' name='rss_optional_1' value='$rss_optional_1'>";
|
||||
//echo " <select name=\"rss_optional_1\" class='formfld'>\n";
|
||||
//echo " <option value=\"$rss_optional_1\">$rss_optional_1</option>\n";
|
||||
//echo " <option value=\"\"></option>\n";
|
||||
//echo " <option value=\"low\">low</option>\n";
|
||||
//echo " <option value=\"med\">med</option>\n";
|
||||
//echo " <option value=\"high\">high</option>\n";
|
||||
//echo " </select>";
|
||||
//echo " </td>";
|
||||
//echo " </tr>";
|
||||
//echo " <tr>";
|
||||
//echo " <td class='vncellreq'>Status:</td>";
|
||||
//echo " <td class='vtable'>";
|
||||
//echo " <input type='text' name='rss_optional_2' value='$rss_optional_2'>";
|
||||
//echo " <select name=\"rss_optional_2\" class=\"formfld\">\n";
|
||||
//echo " <option value=\"$rss_optional_2\">$rss_optional_2</option>\n";
|
||||
//echo " <option value=\"\"></option>\n";
|
||||
//echo " <option value=\"0\">0</option>\n";
|
||||
//echo " <option value=\"10\">10</option>\n";
|
||||
//echo " <option value=\"20\">20</option>\n";
|
||||
//echo " <option value=\"30\">30</option>\n";
|
||||
//echo " <option value=\"40\">40</option>\n";
|
||||
//echo " <option value=\"50\">50</option>\n";
|
||||
//echo " <option value=\"60\">60</option>\n";
|
||||
//echo " <option value=\"70\">70</option>\n";
|
||||
//echo " <option value=\"80\">80</option>\n";
|
||||
//echo " <option value=\"90\">90</option>\n";
|
||||
//echo " <option value=\"100\">100</option>\n";
|
||||
//echo " </select>";
|
||||
//echo " </td>";
|
||||
//echo " </tr>";
|
||||
//echo " <tr>";
|
||||
//echo " <td class='vncellreq'>Optional 3:</td>";
|
||||
//echo " <td class='vtable'><input type='text' class='formfld' name='rss_optional_3' value='$rss_optional_3'></td>";
|
||||
//echo " </tr>";
|
||||
//echo " <tr>";
|
||||
//echo " <td class='vncellreq'>Optional 4:</td>";
|
||||
//echo " <td class='vtable'><input type='text' class='formfld' name='rss_optional_4' value='$rss_optional_4'></td>";
|
||||
//echo " </tr>";
|
||||
//echo " <tr>";
|
||||
//echo " <td class='vncellreq'>rss_optional_5:</td>";
|
||||
//echo " <td class='vtable'><input type='text' class='formfld' name='rss_optional_5' value='$rss_optional_5'></td>";
|
||||
//echo " </tr>";
|
||||
//echo " <tr>";
|
||||
//echo " <td class='vncellreq'>rss_add_date:</td>";
|
||||
//echo " <td class='vtable'><input type='text' class='formfld' name='rss_add_date' value='$rss_add_date'></td>";
|
||||
//echo " </tr>";
|
||||
|
||||
echo " <tr>";
|
||||
echo " <td class='' colspan='2' align='right'>";
|
||||
//echo "<input type=\"button\" value=\"Load\" onclick=\"document.getElementById('rss_description').innerHTML = 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='submit' class='btn' name='submit' value='Save'>";
|
||||
echo " </td>";
|
||||
echo " </tr>";
|
||||
echo "</table>";
|
||||
echo "</form>";
|
||||
|
||||
if ($rss_optional_1 == "text/javascript") {
|
||||
echo "<script type=\"text/javascript\" language=\"javascript\">\n";
|
||||
echo " document.getElementById('rss_description').innerHTML = ajaxresponse;\n";
|
||||
echo "</script>\n";
|
||||
}
|
||||
|
||||
echo " </td>";
|
||||
echo " </tr>";
|
||||
echo "</table>";
|
||||
echo "</div>";
|
||||
|
||||
|
||||
require_once "includes/footer.php";
|
||||
?>
|
||||
Reference in New Issue
Block a user