PCCS MySQLDatabase Admin Tool version 1.3.4


/genapp/ -> genapp_include.php

1  <?
2  $inc_path = "./myuser_incs/";
3  // $ext = "_global.vars.inc";
4  //$filename = "$inc_path$user$ext";
5  $filename = "testing-include.txt";
6  $full_name = "Chauncey Thorn";
7  // $email = "$e-mail";
8  $url = "http://web.wt.net/~cthorn/";
9 
10          $f = fopen($filename, "w") or die("This app requires WRITE access");
11          fputs($f, "<?\n\n");
12          fputs($f, "////////////////////////////////////////////////////\n");
13          fputs($f, "// Generated by PCCS MySQLDatabase Web Admin Module\n");
14          fputs($f, "// This file is your Global Variable Include file\n");
15          fputs($f, "//\n");
16          fputs($f, "// Web PHP/MySQL Account Information\n");
17          fputs($f,"//\tName: $full_name \n//\tE-Mail Address: $email\n// \n");
18          fputs($f,"//\tWeb Address: $url\n//\n");
19          fputs($f, "// Billing Address //\n// \n");
20          fputs($f, "//\t Street: $b_street_address\n");
21          fputs($f, "//\t City: $b_city State: $b_state Zip: $b_zip Country: $b_country\n");
22          fputs($f, "//\n// Mailing Address //\n// \n");
23          fputs($f, "//\t Street: $m_street_adress\n");
24          fputs($f, "//\t City: $m_city State: $m_state Zip: $m_zip Country: $m_country\n");
25          fputs($f, "//\t Phone: $phone\n");
26          fputs($f, "//\t Fax: $fax\n");
27          fputs($f, "//\n// \t Comments: $comments\n// \n//\n");
28          fputs($f, "\n\n\$mydb_server = \"localhost\";\n");
29          fputs($f, "\$mydb_user = \"$user\";\n");
30          fputs($f, "\$mydb_passwd = \"$passwd\";\n");
31          fputs($f, "\$dbname = \"$_name$user\";\n");
32          fputs($f, "\n\$cur_date=date(\"l M d, Y\"); // current date\n\n");
33          fputs($f,"\$c = mysql_connect(\"\$mydb_server\",\"\$mydb_user\",\"\$mydb_passwd\");\n");
34          fputs($f,"\$debug_queries=0;\n");
35          fputs($f,"\n\nfunction runquery(\$dbname,\$query)\n");
36          fputs($f,"{\n global \$debug_queries;\n if (\$debug_queries!=0)\n");
37          fputs($f," echo \$query.\"<BR>\";\n");
38          fputs($f," \$result = mysql(\$dbname,\$query);\n");
39          fputs($f," return \$result;\n}\n");
40          fputs($f,"\n\n// BODY Colors //\n\n");
41          fputs($f, "\$col_bg=\"#FFFFFF\"; // Background color\n");
42          fputs($f, "\$col_text=\"#000000\"; // Text color\n");
43          fputs($f, "\$col_link=\"#FFCC33\"; // Link color\n");
44          fputs($f, "\$col_vlink=\"#FFFF99\"; // Visited Link color\n");
45          fputs($f, "\$col_alink=\"#000000\"; // Active Link color\n");
46          fputs($f, "\n\n");
47          fputs($f, "// Header Function //\n");
48          fputs($f, "\n\tfunction common_header(\$_title) {");
49          fputs($f, "\n\tglobal \$col_bg,\$col_text,\$col_link,\$col_alink,\$col_vlink;");
50          fputs($f, "\n\n\tprint \"");
51          fputs($f, "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 3.2 Final//EN\">");
52          fputs($f, "\n\t<HTML>");
53          fputs($f, "\n\t<HEAD>");
54          fputs($f, "\n\t\t<META NAME=\"Author\" CONTENT=\"$full_name\">");
55          fputs($f, "\n\t\t<META NAME=\"Description\" CONTENT=\"Add your description here\">");
56          fputs($f, "\n\t\t<META NAME=\"Keywords\" CONTENT=\"Add your keywords here\">");
57          fputs($f, "\n\t\t<TITLE>\$_title</TITLE>");
58          fputs($f, "\n\t</HEAD>\n\n");
59          fputs($f, "\t<BODY bgcolor=\"\$col_bg\" text=\"\$col_text\" link=\"\$col_link\" alink=\"\$col_alink\" vlink=\"\$col_vlink\">");
60          fputs($f, "\n\";");
61          fputs($f, "\n}");
62          fputs($f, "\n\n// Footer //");
63          fputs($f, "\n\n\tfunction footer() {");
64          fputs($f, "\n\t\tprint\"</BODY></HTML>\";");
65          fputs($f, "\n\t}");
66          fputs($f, "\n\n// Fonts //");
67          fputs($f, "\n\n\$myfonts = \"arial,helvetica\";");
68          fputs($f, "\n\$fontsize = 1;");
69          fputs($f, "\n\n\tfunction fontColor(\$color,\$fontsize,\$txt) {");
70          fputs($f, "\n\t\tglobal \$myfonts;");
71          fputs($f, "\n\t\tprint \"<FONT FACE=\"\$myfonts\" COLOR=\"\$color\" SIZE=\"\$fontsize\">\$txt </FONT>\";");
72          fputs($f, "\n\t}");
73          fputs($f, "\n\n// Display Image //");
74          fputs($f, "\n\n\tfunction displayImage(\$img_name) {");
75          fputs($f, "\n\t\tprint \"<IMG SRC=\"\$img_name\" BORDER=\"0\">\";");
76          fputs($f, "\n\t}");
77          fputs($f, "\n");
78          fputs($f, "\n// Display Beginning of Table //");
79 
80          fputs($f, "\n\n\tfunction displayTable_begin(\$border,\$width,\$cellspacing,\$cellpadding) {");
81          fputs($f, "\n\n\t\tprint \"<TABLE BORDER=\"\$border\"");
82          fputs($f, "\n\t\t\t\tWIDTH=\"\$width\"");
83          fputs($f, "\n\t\t\t\tCELLSPACING=\"\$cellspacing\"");
84          fputs($f, "\n\t\t\t\tCELLPADDING=\"\$cellpadding\">\"");
85          fputs($f, "\n\t}");
86          fputs($f, "\n\n// Display End of Table //");
87          fputs($f, "\n\n\tfunction displayTable_end() {");
88          fputs($f, "\n\n\t\tprint \"</TABLE>\"");
89          fputs($f, "\n\t}");
90          fputs($f, "\n\n?>");
91          fclose($f);
92  ?>
93 


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