Show module.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");
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");
break;
case "addcomment":
if ($XCS->VerifyUser()) {
$currentModule->object->addComment($_POST['id'],$_POST['base'],$_POST['instance'],$_POST['text'],$_POST['user_id'],$_POST['name'],$_POST['email'],$_POST['website']);
}
Engine::Redirect($_POST['redirect'],Engine::FORCEURL);
break;
default:
}
?>
See more files for this project here