$id_news = tp('lin'); model::load('news', 'news'); //Execute Model if (!suppnews($id_news)) { exit("2#Erreur Système"); //Error opération } else { exit("1#Suppression réussie"); //Success Opération } } else { if (tp('show') == 1) { $id_news = tp('lin'); model::load('news', 'news'); //Execute Model if (!shownews($id_news)) { exit("2#Erreur Système"); //Error opération } else { exit("1#Suppression réussie"); //Success Opération } } else { if (tp('arch') == 1) { $id_news = tp('lin'); model::load('news', 'news'); //Execute Model if (!archnews($id_news)) { exit("2#Erreur Système"); //Error opération } else {
//lets create a next page link if needed if ($page != $pages) { $CONTENT .= "<a href='news.php?page=" . ($page + 1) . "'>next</a>\r\n"; } $CONTENT .= "<div align=\"right\"><a href='news.php?onepage=1'>Show all requests on one page.</a></div><br />\r\n"; } } else { $CONTENT .= "There are no active news at this time.<BR>\r\n"; } $WORK = insert_into_template($MAIN, "{CONTENT}", $CONTENT); $WORK = filltemplate($WORK, "News"); //when we output this lets make sure that the output is stripped of any template elements that are not used. printf("%s", striptemplate($WORK)); } //===Main code================================================================ //check to see if the user is logged in. $user = getuserinfo(); if (0 == strcmp($user['email'], "anonymous")) { $logged_in = 0; } else { $logged_in = 1; } //start main code here. //lets handle the user interaction here. if (isset($HTTP_GET_VARS['category']) && is_numeric($HTTP_GET_VARS['category'])) { $category = $HTTP_GET_VARS['category']; } else { $category = 0; } shownews($category);
$id_doc = tp('lin'); model::load('doc', 'doc'); //Execute Model if (!suppnews($id_doc)) { exit("2#Erreur Système"); //Error opération } else { exit("1#Suppression réussie"); //Success Opération } } else { if (tp('show') == 1) { $id_doc = tp('lin'); model::load('doc', 'doc'); //Execute Model if (!shownews($id_doc)) { exit("2#Erreur Système"); //Error opération } else { exit("1#Suppression réussie"); //Success Opération } } else { if (tp('arch') == 1) { $id_doc = tp('lin'); model::load('doc', 'doc'); //Execute Model if (!archnews($id_doc)) { exit("2#Erreur Système"); //Error opération } else {
$result = db_query($sql); $rows = db_num_rows($result); if ($rows != 0) { $row = db_fetch_array($result); $postedby = getuser($row['posted_by']); //lets insert the prayerrequest into our working copy of this template. $WORK = insert_into_template($NEWS, "{NEWSTITLE}", stripslashes($row['news_title'])); $WORK = insert_into_template($WORK, "{TEASER}", stripslashes($row['teaser'])); $WORK = insert_into_template($WORK, "{NEWSID}", $row['id']); $WORK = insert_into_template($WORK, "{POSTEDBY}", $postedby); $WORK = insert_into_template($WORK, "{BYLINE}", $row['byline']); $WORK = insert_into_template($WORK, "{DATE}", date("m/d/Y", $row['date'])); $WORK = insert_into_template($WORK, "{CATEGORY}", getcatname($row['category'])); $WORK = insert_into_template($WORK, "{NEWS}", stripslashes($row['news'])); $i++; //now lets add this request to the CONTENT. $WORK = insert_into_template($MAIN, "{CONTENT}", $WORK); $WORK = filltemplate($WORK, striphtml($row['news_title'])); printf("%s", striptemplate($WORK)); } } //===Main code================================================================ if (isset($HTTP_GET_VARS['news']) && is_numeric($HTTP_GET_VARS['news'])) { shownews($HTTP_GET_VARS['news']); } else { $CONTENT = "ERROR: An invalid news item was requested."; $WORK = insert_into_template($MAIN, "{CONTENT}", $CONTENT); //when we output this lets make sure that the output is stripped of any template elements that are not used. $WORK = filltemplate($WORK, "News Error"); printf("%s", striptemplate($WORK)); }
$id_vod = tp('lin'); model::load('com', 'com'); //Execute Model if (!suppnews($id_vod)) { exit("2#Erreur Système"); //Error opération } else { exit("1#Suppression réussie"); //Success Opération } } else { if (tp('show') == 1) { $id_vod = tp('lin'); model::load('com', 'com'); //Execute Model if (!shownews($id_vod)) { exit("2#Erreur Système"); //Error opération } else { exit("1#Suppression réussie"); //Success Opération } } else { if (tp('arch') == 1) { $id_vod = tp('lin'); model::load('com', 'com'); //Execute Model if (!archnews($id_vod)) { exit("2#Erreur Système"); //Error opération } else {
<?php if (isset($_REQUEST['del']) && $_REQUEST['del'] == 1) { model::load('album', 'album'); if (!suppnews($_REQUEST['albumid'])) { $reponse = 'Erreur enregistrements'; } else { $reponse = 'ok'; } } else { if (isset($_REQUEST['arch']) && $_REQUEST['arch'] == 1) { model::load('album', 'album'); if (!archnews($_REQUEST['albumid'])) { $reponse = 'Erreur enregistrements'; } else { $reponse = 'ok'; } } else { if (isset($_REQUEST['show']) && $_REQUEST['show'] == 1) { model::load('album', 'album'); if (!shownews($_REQUEST['albumid'])) { $reponse = 'Erreur enregistrements'; } else { $reponse = 'ok'; } } else { view::load('album', 'album'); } } } view::load('album', 'album');