toDB($_POST['newsfeed_name']); $feed['newsfeed_description'] = $tp->toDB($_POST['newsfeed_description']); $feed['newsfeed_image'] = $tp->toDB($_POST['newsfeed_image'])."::".intval($_POST['newsfeed_showmenu'])."::".intval($_POST['newsfeed_showmain']); $feed['newsfeed_url'] = $tp->toDB($_POST['newsfeed_url']); $feed['newsfeed_active'] = intval($_POST['newsfeed_active']); $feed['newsfeed_updateint'] = intval($_POST['newsfeed_updateint']); $feed['newsfeed_data'] = ''; // Start with blank data feed $feed['newsfeed_timestamp'] = 0; // This should force an immediate update if (isset($_POST['createFeed'])) { if ($sql->insert('newsfeed',$feed)) { $admin_log->logArrayAll('NEWSFD_01', $feed); $mes->addSuccess(LAN_CREATED); } else { $mes->addError(LAN_CREATED_FAILED.': '.$sql->mySQLerror); } } elseif (isset($_POST['updateFeed'])) { if ($sql->insert('newsfeed',$feed, " WHERE newsfeed_id=".intval($_POST['newsfeed_id']))) { $admin_log->logArrayAll('NEWSFD_02', $feed); $mes->addSuccess(LAN_UPDATED); } else { $mes->addInfo(LAN_NO_CHANGE.': '.$sql->mySQLerror); } } $e107->ecache->clear(NEWSFEED_LIST_CACHE_TAG); // This should actually clear all the newsfeed data in one go } else { $mes->addError(LAN_REQUIRED_BLANK); } } $ns->tablerender($caption, $mes->render() . $text); if($action == "delete") { $sql->db_Delete('newsfeed', 'newsfeed_id='.$id); $admin_log->log_event('NEWSFD_03','ID: '.$id,E_LOG_INFORMATIVE,''); $mes->addSuccess(LAN_DELETED); } $ns->tablerender($caption, $mes->render() . $text); if($headline_total = $sql->db_Select("newsfeed")) { $nfArray = $sql->rows(); $text = "
".LAN_ID." | ".LAN_NAME." | ".NFLAN_26." | ".NFLAN_12." | ".LAN_OPTIONS." |
$newsfeed_id | $newsfeed_name | ".($newsfeed_updateint ? $newsfeed_updateint : "3600")." | ".$active[$newsfeed_active]." | ".ADMIN_EDIT_ICON." ".ADMIN_DELETE_ICON." |