Show admin.old.php syntax highlighted
<?php
switch ($_GET['op']) {
case "delete" :
$TA = new TA();
$TA->addQuery(TA :: DELETE, "xcs_module_comments");
$TA->WHERE("`id`='".$_GET['id']."'");
$TA->LIMIT(1);
$TA->Execute();
$TA->End();
Engine :: Redirect("index.php?file=admin&module=comments");
break;
case "change_approve" :
if ($_GET['approved'] == 1) {
$approved = 0;
} else {
$approved = 1;
}
$TA = new TA();
$TA->addQuery(TA :: UPDATE, "xcs_module_comments");
$TA->addParam("approved", TA :: NUMBER, $approved);
$TA->WHERE("`id`='".$_GET['id']."'");
$TA->LIMIT(1);
$TA->Execute();
$TA->End();
Engine :: Redirect("index.php?file=admin&module=comments");
break;
default :
$comments = $currentModule->object->getNotApprovedComments();
$currentModule->addContent("content_admin.php");
$currentModule->registerVariable($comments, "comments");
}
?>
See more files for this project here