# $Id: cusbyentid.php,v 1.2 2003/02/25 11:45:44 helix Exp $ # ###################################################################### require "./include/prepend.php3"; page_open(array("sess" => "SourceBiz_Session")); if (isset($auth) && !empty($auth->auth["perm"])) { page_close(); page_open(array("sess" => "SourceBiz_Session", "auth" => "SourceBiz_Auth", "perm" => "SourceBiz_Perm")); } require "./include/header.inc"; require "./include/entlib.inc"; require "./include/cuslib.inc"; $bx = new box("100%", $th_box_frame_color, $th_box_frame_width, $th_box_title_bgcolor, $th_box_title_font_color, $th_box_title_align, $th_box_body_bgcolor, $th_box_body_font_color, $th_box_body_align); $be = new box("", $th_box_frame_color, $th_box_frame_width, $th_box_title_bgcolor, $th_box_title_font_color, $th_box_title_align, $th_box_body_bgcolor, $th_box_error_font_color, $th_box_body_align); $bs = new box("100%", $th_strip_frame_color, $th_strip_frame_width, $th_strip_title_bgcolor, $th_strip_title_font_color, $th_strip_title_align, $th_strip_body_bgcolor, $th_strip_body_font_color, $th_strip_body_align); ?> <!-- content --> <?php if (isset($id)) { entbyentid($db, $id); cusbyentid($db, $id); } else { $be->box_full($t->translate("Error"), $t->translate("No Enterprise ID specified")); } ?> <!-- end content --> <?php require "./include/footer.inc"; page_close();
if (!copy($logo, $to)) { $be->box_full($t->translate("Error"), $t->translate("Unable to copy logofile to logo directory")); } if (!chmod($to, 0666)) { $be->box_full($t->translate("Error"), $t->translate("Unable to change logofile mode")); } } // Insert new counters $dbcnt = new DB_SourceBiz(); $tables = "counter"; $set = "entid=" . $db->f("entid"); if (!$dbcnt->query("INSERT {$tables} SET {$set}")) { mysql_die($dbcnt); } else { // Select and show new enterprise with counters entbyentid($db, $db->f("entid")); if ($ml_notify) { $msg = "insert enterprise {$name} by " . $auth->auth["uname"] . "."; mailuser("admin", "insert enterprise", $msg); } } } } } } } else { $be->box_full($t->translate("Error"), $t->translate("No Short Profile specified")); } } else { $be->box_full($t->translate("Error"), $t->translate("No Name specified")); }