<?php
							 | 
						|
								/** 
							 | 
						|
								* @package	Dynamic Script Forum 
							 | 
						|
								* @file		install/functions_add.php
							 | 
						|
								* @version or 	1.0.x, 08-06-2008, 13:26 
							 | 
						|
								* @copyright	2008(c) PioDer <[email protected]>
							 | 
						|
								* @link 	http://pioder.gim2przemysl.int.pl/dsf.html/
							 | 
						|
								* @license	GNU GPL v3
							 | 
						|
								**/
							 | 
						|
								if (!defined('IN_uF'))
							 | 
						|
								{
							 | 
						|
									die('Hacking attempt');
							 | 
						|
								}
							 | 
						|
								//functions installer
							 | 
						|
								function alert($msg)
							 | 
						|
								{
							 | 
						|
									echo '<script language="JavaScript">window.alert(\''.$msg.'\');</script>';
							 | 
						|
								}
							 | 
						|
								function check_size_md5($file)
							 | 
						|
								{
							 | 
						|
									if ( file_exists($file) )
							 | 
						|
									{
							 | 
						|
										$result = @filesize($file);
							 | 
						|
										return md5($result);
							 | 
						|
									}
							 | 
						|
									else
							 | 
						|
									{
							 | 
						|
										return false;
							 | 
						|
									}
							 | 
						|
								}
							 | 
						|
								function AddLangs($default)
							 | 
						|
								{
							 | 
						|
									$result='';
							 | 
						|
									$rep=opendir('./../lngs');
							 | 
						|
									while ($file = readdir($rep))
							 | 
						|
									{
							 | 
						|
										if($file != '..' && $file !='.' && $file !='')
							 | 
						|
										{ 
							 | 
						|
											if (is_dir('./../lngs/'.$file)){
							 | 
						|
											  	if (($file=='Polish') and $default){
							 | 
						|
												  $result .='<option selected="selected" value="'.$file.'">'.$file.'</option>';
							 | 
						|
												} else {
							 | 
						|
												  $result .='<option value="'.$file.'">'.$file.'</option>';
							 | 
						|
												}
							 | 
						|
											}
							 | 
						|
										}
							 | 
						|
									}
							 | 
						|
									return $result;
							 | 
						|
									unset($rep, $file, $result);
							 | 
						|
								}
							 | 
						|
								function AddPages2($page)//for admin script, not used in limit!
							 | 
						|
								{
							 | 
						|
								   	$content = '';
							 | 
						|
								   	for ($i=1;$i<=50;$i++)
							 | 
						|
								   	{
							 | 
						|
								     		if ($i==$page)
							 | 
						|
								     		{
							 | 
						|
											$content .= '<option value="'.$i.'" selected="selected">'.$i.'</option>';
							 | 
						|
										}
							 | 
						|
										else
							 | 
						|
										{
							 | 
						|
											$content .= '<option value="'.$i.'">'.$i.'</option>';
							 | 
						|
										}
							 | 
						|
								     	}
							 | 
						|
									return $content;
							 | 
						|
									unset($content);
							 | 
						|
								}
							 | 
						|
								?>
							 |