function get_rssfeeds_form() { global $mod_strings; global $app_strings; global $app_list_strings; global $image_path; $oRss = new vtigerRSS(); $allrsshtml = $oRss->getRSSCategoryHTML(); //$starred_rss_html = $oRss->getStarredRssFolder(); $the_form .= '<table width="100%" border="0" cellspacing="2" cellpadding="0" style="margin-top:10px">'; $the_form .= $allrsshtml; $the_form .= "</table>"; return $the_form; }
/** * this function gets the detailed information about a rss widget */ private function getRssDetails($rid) { global $mod_strings; if (isPermitted('Rss', 'index') == "yes") { require_once 'modules/Rss/Rss.php'; global $adb; $qry = "select * from vtiger_homerss where stuffid=?"; $res = $adb->pquery($qry, array($rid)); $url = $adb->query_result($res, 0, "url"); $maxval = $adb->query_result($res, 0, "maxentries"); $oRss = new vtigerRSS(); if ($oRss->setRSSUrl($url)) { $rss_html = $oRss->getListViewHomeRSSHtml($maxval); } else { $rss_html = "<strong>" . $mod_strings['LBL_ERROR_MSG'] . "</strong>"; } $return_value = array('Maxentries' => $maxval, 'Entries' => $rss_html); } else { return array('Entries' => "<font color='red'>Not Accessible</font>"); } return $return_value; }
function create_rss_from_webform($username, $sessionid, $url) { global $log; global $adb; global $current_user; if (!validateSession($username, $sessionid)) { return null; } require_once "modules/Users/Users.php"; $seed_user = new Users(); $user_id = $seed_user->retrieve_user_id($username); $current_user = $seed_user; $current_user->retrieve_entity_info($user_id, 'Users'); require_once "modules/Rss/Rss.php"; $oRss = new vtigerRSS(); if (isPermitted("RSS", "EditView") == "yes") { if ($oRss->setRSSUrl($url)) { if ($oRss->saveRSSUrl($url) == false) { return "RSS feed addition failed. Try again"; } else { return 'RSS feed added successfully.'; } } else { return "Not a valid RSS Feed or your Proxy Settings is not correct. Try again"; } } else { return $accessDenied; } }
} } if (!empty($_REQUEST['selmodule'])) { $oHomestuff->selmodule = $_REQUEST['selmodule']; } if (!empty($_REQUEST['maxentries'])) { $oHomestuff->maxentries = $_REQUEST['maxentries']; } if (!empty($_REQUEST['selFiltername'])) { $oHomestuff->selFiltername = $_REQUEST['selFiltername']; } if (!empty($_REQUEST['fldname'])) { $oHomestuff->fieldvalue = $_REQUEST['fldname']; } if (!empty($_REQUEST['txtRss'])) { $ooRss = new vtigerRSS(); if ($ooRss->setRSSUrl($_REQUEST['txtRss'])) { $oHomestuff->txtRss = $_REQUEST['txtRss']; } else { return false; } } if (!empty($_REQUEST['txtURL'])) { $oHomestuff->txtURL = $_REQUEST['txtURL']; } if (isset($_REQUEST['seldashbd']) && $_REQUEST['seldashbd'] != "") { $oHomestuff->seldashbd = $_REQUEST['seldashbd']; } if (isset($_REQUEST['seldashtype']) && $_REQUEST['seldashtype'] != "") { $oHomestuff->seldashtype = $_REQUEST['seldashtype']; }
* All Rights Reserved. * ********************************************************************************/ require_once "data/Tracker.php"; require_once 'include/logging.php'; require_once 'include/utils/utils.php'; require_once 'modules/Rss/Rss.php'; global $mod_strings; $log = LoggerManager::getLogger('rss_save'); if (isset($_REQUEST["record"])) { global $adb; $query = 'update vtiger_rss set starred=0'; $adb->pquery($query, array()); $query = 'update vtiger_rss set starred=1 where rssid =?'; $adb->pquery($query, array($_REQUEST["record"])); echo vtlib_purify($_REQUEST["record"]); } elseif (isset($_REQUEST["rssurl"])) { $newRssUrl = str_replace('##amp##', '&', $_REQUEST["rssurl"]); $setstarred = 0; $oRss = new vtigerRSS(); if ($oRss->setRSSUrl($newRssUrl)) { $result = $oRss->saveRSSUrl($newRssUrl, $setstarred); if ($result == false) { echo $mod_strings['UNABLE_TO_SAVE']; } else { echo $result; } } else { echo $mod_strings['NOT_A_VALID']; } }
* The Original Code is: vtiger CRM Open Source * The Initial Developer of the Original Code is vtiger. * Portions created by vtiger are Copyright (C) vtiger. * All Rights Reserved. ********************************************************************************/ require_once "data/Tracker.php"; require_once 'Smarty_setup.php'; require_once 'include/logging.php'; require_once 'include/ListView/ListView.php'; require_once 'include/utils/utils.php'; require_once 'modules/Rss/Rss.php'; global $app_strings, $app_list_strings, $mod_strings; $current_module_strings = return_module_language($current_language, 'Rss'); $log = LoggerManager::getLogger('rss_list'); global $currentModule, $image_path, $theme, $cache_dir, $adb; $oRss = new vtigerRSS(); if (isset($_REQUEST['folders']) && $_REQUEST['folders'] == 'true') { require_once "modules/" . $currentModule . "/Forms.php"; echo get_rssfeeds_form(); die; } if (isset($_REQUEST['record'])) { $recordid = vtlib_purify($_REQUEST['record']); } $rss_form = new vtigerCRM_Smarty(); $rss_form->assign("MOD", $mod_strings); $rss_form->assign("APP", $app_strings); $rss_form->assign("THEME", $theme); $rss_form->assign("IMAGE_PATH", $image_path); $rss_form->assign("MODULE", $currentModule); $rss_form->assign("CATEGORY", getParenttab());
<?php /*+******************************************************************************** * The contents of this file are subject to the vtiger CRM Public License Version 1.0 * ("License"); You may not use this file except in compliance with the License * The Original Code is: vtiger CRM Open Source * The Initial Developer of the Original Code is vtiger. * Portions created by vtiger are Copyright (C) vtiger. * All Rights Reserved. ********************************************************************************/ require_once 'modules/Rss/Rss.php'; require_once 'include/logging.php'; global $mod_strings; if (isset($_REQUEST["rssurl"])) { $newRssUrl = $_REQUEST["rssurl"]; } $oRss = new vtigerRSS(); if ($oRss->setRSSUrl($newRssUrl)) { if ($oRss->saveRSSUrl($newRssUrl) == false) { echo $mod_strings['UNABLE_TO_SAVE']; } } else { echo $mod_strings['INVALID_RSS_URL']; }