64,9 → 64,6 |
</form> |
<?PHP |
} |
else{ |
|
} |
} |
|
private function generateSkin($name){ |
79,17 → 76,35 |
$GLOBALS['db']->Execute("INSERT INTO {'dbprefix'}skins (name) VALUES ('".$name."')"); |
} |
|
function copyFile($source,$destination){ |
private function copyFile($source,$destination){ |
$content = file_get_contents($source); |
foreach($_GET as $key => $value){ |
$content = str_ireplace("{VAR:".strtoupper($key)."}",$value,$content); |
} |
$content = str_ireplace("{VAR:FONTSTYLESHEETS}",$this->getFontStyleSheets(),$content); |
$handle = fopen($destination, "w"); |
fwrite($handle, $content); |
fclose($handle); |
chmod($destination,0777); |
} |
|
private function getFontStyleSheets(){ |
$res = ""; |
$usedfonts = array(); |
foreach($_GET as $key => $value){ |
echo substr($key,0,10)."|"; |
if(strtolower(substr($key,0,10)) == 'fontfamily'){ |
if(!in_array($value,$usedfonts)){ |
$usedfonts[] = $value; |
} |
} |
} |
foreach($usedfonts as $font){ |
$res .= Plugin_Fonts_Api::getStyleSheetUrl($font); |
} |
return $res; |
} |
|
function getHeader(){ |
return ""; |
} |