GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — marc_web/authMP.php at master · DPMI/marc_web

Expand file tree

/

authMP.php

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
50 lines (42 loc) · 1.55 KB
/

authMP.php

Copy path

File metadata and controls

50 lines (42 loc) · 1.55 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<?php
require("sessionCheck.php");
require("config.php");
require("model/MP.php");
$Connect = mysqli_connect($DB_SERVER, $user, $password) or die ("Cant connect to MySQL at $DB_SERVER");
mysqli_select_db($DATABASE,$Connect) or die ("Cant connect to $DATABASE database");
$ID=$_GET["id"];
$mp = MP::from_id($ID);
if ( !$mp ){
die("invalid mp");
}
$MAMPid = $mp->generate_mampid();
$iface = explode(";", $mp->CI_iface);
$mp->commit();
$tables[] = "CREATE TABLE IF NOT EXISTS `{$MAMPid}_ci` ( `id` INT NOT NULL AUTO_INCREMENT ,
`ci` INT NOT NULL ,
`type` TEXT NOT NULL ,
`mtu` VARCHAR( 20 ) NOT NULL ,
`speed` VARCHAR( 50 ) NOT NULL ,
`comments` TEXT NOT NULL ,
INDEX ( `id` ) )";
$MAMPidCIl="$MAMPid"."_CIload";
$sql_create = "CREATE TABLE IF NOT EXISTS `$MAMPidCIl` ( `id` INT NOT NULL AUTO_INCREMENT, `time` timestamp NOT NULL, `noFilters` INT NOT NULL, `matchedPkts` INT NOT NULL ";
for($i=0;$i<$mp->noCI;$i++){
$sql_create = $sql_create . ",`CI$i` VARCHAR(20) NOT NULL, `PKT$i` INT NOT NULL, `BU$i` INT NOT NULL, `SYNC$i` ENUM('yes','no','undef') NOT NULL DEFAULT 'undef'";
}
$sql_create = $sql_create . ", INDEX( `id` ))";
$tables[] = $sql_create;
/* Create SQL tables */
foreach ( $tables as $query ){
if ( !mysqli_query ($query) ){
echo "<h1>SQL error</h1>\n";
echo "<p>\"" . mysqli_error() . "\"<p>\n";
echo "<p>The attempted query was:</p>\n";
echo "<pre>$query</pre>";
exit;
}
}
/* tell the MP that is has been authorized. */
$mp->auth();
/* go back to MP list */
header("Location: $index/MP");
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.