<?php $project = getproject($sourceid); if ($project[userid] != $login[id] && !is_freesource("project", $project[id], "3")) { eval("\$inc[action] = \"" . gettemplate("fail.access.noaccess") . "\";"); } else { $filesq = $db->query_str("SELECT * FROM {$tab['code_code']} WHERE projectid='{$sourceid}'"); while ($file = $db->fetch_array($filesq)) { $zip->addFile($file[code], $file[filename]); } $dateiname = $project[title] . ".zip"; savetraffic(strlen($zip->file())); header("Content-Type: application/octetstream"); header("Content-Disposition: attachment; filename=" . $dateiname); header("Pragma: no-cache"); header("Expires: 0"); echo $zip->file(); exit; }
<?php if ($_SESSION['phrase'] != $correctPhrase) { exit; } $projectID = $uri[0]; $project = getproject($projectID); $fp = fopen('deleted_projects.txt', 'a'); fwrite($fp, "\n\n##################################################\n"); fwrite($fp, print_r($project, TRUE)); fwrite($fp, "##################################################\n"); fclose($fp); $delete = "DELETE FROM projects WHERE project_id='" . $projectID . "';"; #echo $delete . '<br>'; mysql_query($delete) or die(mysql_error()); ?> <a href="/admin/projects"><<< Back to Project Management</a><br><br> Project Deleted. Data saved in backup text file.
$me = array('version' => '0.2', 'name' => 'OpenStack'); $guid = '5c33db4b-91b8-4e40-8765-b8f849de6b68'; $userid = 'AFPPR46VI4HFCERSD2ENKTJBTCGHF6J6ERFIWCEI7GP4YDXFRBEJI'; $help = "Help Message Goes Here"; include '../validate-echo-request-php/valid_request.php'; $valid = validate_request($guid, $userid); if (!$valid['success']) { error_log('Request failed: ' . $valid['message']); die; } if ($query) { $action = $query->request->intent->name; if ($action == "RandomProject") { $response = randomproject(); } elseif ($action == "GetProject") { $response = getproject($query); } elseif ($action = 'GetHelp') { $response = $help; } else { $response = $help; } sendresponse($response, $me); } else { sendresponse($help, $me); } /* 'Alexa, ask openstack to tell me about a random project' Returns info about a random openstack project */