42 function createPHP($FD, $license)
49 $startTag =
"#!/usr/bin/php\n<?php\n";
52 $sayHey =
"echo \"Hello World!$newLine\";\n";
56 $license = _(
"Copyright Randy Rando, licensed under the BSD license\n");
58 $cLic = $commentChar .
"\n" . $license .
"\n" . $endChar .
"\n";
59 $body = $startTag . $cLic . $sayHey . $endTag;
61 $howMany = fwrite($FD,$body);
65 function createPerl($FD, $license)
68 $startTag =
"#!/usr/bin/perl\n";
70 $sayHey =
"print \"Hello World!$newLine\";\n";
74 $license = _(
"Copyright Randy Rando, licensed under the BSD license\n");
76 $cLic = $commentChar .
"\n" . $license .
"\n" . $endChar .
"\n";
77 $body = $startTag . $cLic . $sayHey . $endTag;
79 $howMany = fwrite($FD,$body);
81 echo
"Perl files not implimented\n";
84 function createCprog($FD, $license)
87 echo
"C files not implimented\n";
90 function createHeader($FD, $license)
93 echo
"header files not implimented\n";
96 function createSh($FD, $license)
99 echo
"shell files not implimented\n";
101 function createTxt($FD, $license)
104 echo
"Text files not implimented\n";
106 function createJs($FD, $license)
109 echo
"Javascript files not implimented\n";
112 function createFile($suffix=NULL, $name=NULL, $license=NULL)
114 require_once
'licenseText.php';
118 echo
"after require\n";
137 $defaultName =
'TestFile';
139 $sufixNum = rand(0,count($suffix)-1);
140 $licensePick = rand(0,count($licenses)-1);
155 $name = $defaultName . $suffix[$sufixNum];
156 echo
"***** Getting license *****\n";
157 $license = $licenses[$licensePick];
160 echo
"name is:$name\n";
161 $FD = fopen($name,
'w');
167 switch ($suffix[$sufixNum])
172 $rtn = createCprog($FD, $license);
177 $rtn = createHeader($FD, $license);
182 $rtn = createPHP($FD, $license);
190 $rtn = createPerl($FD, $license);
195 $rtn = createJs($FD, $license);
199 $rtn = createSh($FD, $license);
203 $rtn = createTxt($FD, $license);
212 echo
"*********** starting.... *************\n";