Results 1 to 6 of 6
Thread: PHP .
Hybrid View
-
9th January 2007 11:15 #1
PHP .
, PHP-

php , gal-title.txt . , .
, gal-title.txt, , .
PHP , gal-desc.txt:
:Code:function getDirDesc($dir){ $file=$dir.GAL_FILE; if(file_exists($file)){ $fd=@fopen($file,'r'); while(!feof($fd)) $desc.=@fread($fd,1024); } return $desc; }
GAL_FILE settings.phpCode:<?php if($dir!=''){ echo "\t<hr/>\n"; echo "\t".get(42).":<br/><br/>\n"; echo "\t<form method=\"get\" action=\"\"><div>\n"; echo "\t\t".str_replace("/","",str_replace("_"," ",$curr_dir))."\n"; if($rename&&$pic==''){ echo "\t\t<input type=\"hidden\" name=\"dir\" value=\"{$dir}\" />\n"; echo "\t\t<input type=\"hidden\" name=\"rename\" value=\"true\" />\n"; echo "\t\t<input type=\"hidden\" name=\"confirm\" value=\"true\" />\n"; echo "\t\t<br/><input name=\"name\" value=\"".str_replace("_"," ",$curr_dir)."\" />\n"; echo "\t\t<input type=\"submit\" value=\"".get(43)."\" /><br/>\n"; } else echo "\t\t[<a href=\"?dir={$dir}&rename=true\">".get(43)."</a>]\n"; $desc=getDirDesc(BASE_DIR.$dir); if($desc==''&&!$edit) $desc=get(48); if($edit&&$pic==''){ echo "\t\t<input type=\"hidden\" name=\"dir\" value=\"{$dir}\" />\n"; echo "\t\t<input type=\"hidden\" name=\"edit\" value=\"true\" />\n"; echo "\t\t<input type=\"hidden\" name=\"confirm\" value=\"true\" />\n"; echo "\t\t<textarea name=\"desc\" cols=\"25\" rows=\"15\">{$desc}</textarea><br/>\n"; echo "\t\t<input type=\"submit\" value=\"".get(47)."\" />\n"; } else{ echo "\t\t<span class=\"description\">{$desc}\n"; echo "\t\t[<a href=\"?dir={$dir}&edit=true\">".get(49)."</a>]</span>\n"; } echo "\t</div></form>\n"; } ?>
....Code:define("GAL_FILE","gal-desc.txt");
1. setings.php :
2. PHP :Code:define("GAL_TITLE","gal-title.txt");
3. , GAL_FILE, GAL_TITLE. 1-2 , .Code:function getDirTitle($dir){ $file=$dir.GAL_TITLE; if(file_exists($file)){ $fd=@fopen($file,'r'); while(!feof($fd)) $desc.=@fread($fd,1024); } return $desc; }
, gal-desc.txt. , gal-title.txt. get(..) , - . ... , ,
,
: . gal-title.txt . .Last edited by morf; 9th January 2007 at 11:21.
-
9th January 2007 11:59 #2
SPGM

.
get(47) , SPGMCode:echo "\t\t<input type=\"submit\" value=\"".get(47)."\" />\n";
-
9th January 2007 12:04 #3
SPGM e

- SPG . . SPGM gal-title.
47 : $messages['en'][47]="Save";
-
9th January 2007 12:24 #4
-
9th January 2007 13:25 #5
-
9th January 2007 21:35 #6




Reply With Quote

Lenovo ThinkPad 15 IdeaPad 15
5th May 2023, 22:16 in