53 function createPHP($FD, $license)
60 $startTag =
"#!/usr/bin/php\n<?php\n";
63 $sayHey =
"echo \"Hello World!$newLine\";\n";
67 $license = _(
"Copyright Randy Rando, licensed under the BSD license\n");
69 $cLic = $commentChar .
"\n" . $license .
"\n" . $endChar .
"\n";
70 $body = $startTag . $cLic . $sayHey . $endTag;
72 $howMany = fwrite($FD,$body);
76 function createPerl($FD, $license)
79 $startTag =
"#!/usr/bin/perl\n";
81 $sayHey =
"print \"Hello World!$newLine\";\n";
85 $license = _(
"Copyright Randy Rando, licensed under the BSD license\n");
87 $cLic = $commentChar .
"\n" . $license .
"\n" . $endChar .
"\n";
88 $body = $startTag . $cLic . $sayHey . $endTag;
90 $howMany = fwrite($FD,$body);
92 echo
"Perl files not implimented\n";
95 function createCprog($FD, $license)
98 echo
"C files not implimented\n";
101 function createHeader($FD, $license)
104 echo
"header files not implimented\n";
107 function createSh($FD, $license)
110 echo
"shell files not implimented\n";
112 function createTxt($FD, $license)
115 echo
"Text files not implimented\n";
117 function createJs($FD, $license)
120 echo
"Javascript files not implimented\n";
123 function createFile($suffix=NULL, $name=NULL, $license=NULL)
125 require_once
'licenseText.php';
129 echo
"after require\n";
148 $defaultName =
'TestFile';
150 $sufixNum = rand(0,count($suffix)-1);
151 $licensePick = rand(0,count($licenses)-1);
166 $name = $defaultName . $suffix[$sufixNum];
167 echo
"***** Getting license *****\n";
168 $license = $licenses[$licensePick];
171 echo
"name is:$name\n";
172 $FD = fopen($name,
'w');
178 switch ($suffix[$sufixNum])
183 $rtn = createCprog($FD, $license);
188 $rtn = createHeader($FD, $license);
193 $rtn = createPHP($FD, $license);
201 $rtn = createPerl($FD, $license);
206 $rtn = createJs($FD, $license);
210 $rtn = createSh($FD, $license);
214 $rtn = createTxt($FD, $license);
223 echo
"*********** starting.... *************\n";