function PostInitialize() { global $Plugins; if ($this->State != PLUGIN_STATE_VALID) { return 0; } // don't run // Make sure dependencies are met foreach ($this->Dependency as $key => $val) { $id = plugin_find_id($val); if ($id < 0) { Destroy(); return 0; } } // Add default menus (with no actions linked to plugins) menu_insert("Main::Upload", 70); menu_insert("Main::Jobs", 60); menu_insert("Main::Organize", 50); menu_insert("Main::Help", -1); menu_insert("Main::Help::Documentation", 0, NULL, NULL, NULL, "<a href='http://www.fossology.org/projects/fossology/wiki/User_Documentation'>Documentation</a>"); // It worked, so mark this plugin as ready. $this->State = PLUGIN_STATE_READY; return $this->State == PLUGIN_STATE_READY; }
<?php include "database.php"; function Destroy() { unset($_SESSION['SESS_MEMBER_ID']); header("location: index.php"); } if (isset($_SESSION['SESS_MEMBER_ID'])) { $email = $_SESSION['SESS_MEMBER_ID']; $qry = mysql_query("SELECT * FROM users WHERE email = '{$email}' "); if (mysql_num_rows($qry) != 1) { Destroy(); } } else { Destroy(); }