PCCS MySQLDatabase Admin Tool version 1.3.4


/ -> mysqldb_create_randomscript.php

1  <?php
2  /************************************************************************
3  PCCS MySQLDatabase Admin Tool
4  Copyright (C) Chauncey Thorn
5 
6  This program is free software; you can redistribute it and/or
7  modify it under the terms of the GNU General Public License
8  as published by the Free Software Foundation; either version 2
9  of the License, or (at your option) any later version.
10 
11  This program is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with this program; if not, write to the Free Software
18  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA , USA.
19  **************************************************************************/
20 
21  ///////////////////////////////////////////////////////////////////////////////
22  // Create randomscript.php
23  // no need to modify unless you like hacking
24  // bugs report to cthorn
25  ///////////////////////////////////////////////////////////////////////////////
26 
27 
28  $randomscript_filename="randomscript.php";
29  $randomscript = fopen($appfiledir . $randomscript_filename,"w");
30  fputs($randomscript,"<?php\n//** Generated by PCCS-MyAppGen $today\n");
31  fputs($randomscript,"/////////////////////////////////////////////////////////////////////////////////////\n");
32  fputs($randomscript,"// coder: cthorn\n");
33  fputs($randomscript,"////////////////////////////////////////////////////////////////////////////\n");
34  fputs($randomscript,"//\n");
35  fputs($randomscript,"//\n");
36  fputs($randomscript,"srand((double)microtime()*1000000);\n");
37  fputs($randomscript,"\$randomtopic = rand(0,5);\n");
38  fputs($randomscript,"\n");
39  fputs($randomscript,"\n");
40  fputs($randomscript,"if (\$randomtopic == \"0\") {\n");
41  fputs($randomscript,"echo ( \"Random Text or Image 0\");\n");
42  fputs($randomscript,"\n");
43  fputs($randomscript,"\n");
44  fputs($randomscript,"} else if (\$randomtopic == \"1\") {\n");
45  fputs($randomscript,"echo ( \"Random Text or Image 1\");\n");
46  fputs($randomscript,"\n");
47  fputs($randomscript,"\n");
48  fputs($randomscript,"} else if (\$randomtopic == \"2\") {\n");
49  fputs($randomscript,"echo ( \"Random Text or Image 2\");\n");
50  fputs($randomscript,"\n");
51  fputs($randomscript,"\n");
52  fputs($randomscript,"} else if (\$randomtopic == \"3\") {\n");
53  fputs($randomscript,"echo ( \"Random Text or Image 3\");\n");
54  fputs($randomscript,"\n");
55  fputs($randomscript,"\n");
56  fputs($randomscript,"} else if (\$randomtopic == \"4\") {\n");
57  fputs($randomscript,"echo ( \"Random Text or Image 4\");\n");
58  fputs($randomscript,"\n");
59  fputs($randomscript,"\n");
60  fputs($randomscript,"} else if (\$randomtopic == \"5\") {\n");
61  fputs($randomscript,"echo ( \"Random Text or Image 5\");\n");
62  fputs($randomscript,"\n");
63  fputs($randomscript,"}\n");
64  fputs($randomscript,"//\n");
65  fputs($randomscript,"//////////////////////////////////////////////////////////////////////////\n");
66  fputs($randomscript,"?>\n");
67  fclose($randomscript);
68 
69 
70  ?>


Generated: Sat Jan 27 15:40:36 2001 Generated by PHPXref 0.1.2
PCCS-Linux.COM ::ource Advocate Articles catalogue
2000 2002