Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: Pagalbos

Parašė weberiz· 2011 Rugp. 10 22:08:45
#3

nu vnz kaška prigaminau for fun veiks neveiks nzn :)

<?php
if (!defined("IN_FUSION")) { die("Access Denied"); }
$pasirinkimas=array(1 => 
"Mega club",
"Havana",
"staroad",
"Kita"); // pasirinkimai
$kiek = count($pasirinkimas);
if ($profile_method == "input") {
	echo "<tr>\n";
	echo "<td class='tbl'>".$locale['uf_club'].":</td>\n";
	echo "<td class='tbl'><select name='miestas' class='textbox' style='width:250px;'>";
	$i = 1;
	while ($i != $kiek) {
		if ($user_data['user_club'] == $i) { $sel="selected"; } else { $sel=""; }
		echo "<option value='".$i."' ".$sel.">".$pasirinkimas[$i]."</option>";
		$i++;
	}
	echo "</select></td>\n";
} elseif ($profile_method == "display") {
	if ($user_data['user_club']) {
		echo "<tr>\n";
		echo "<td width='1%' class='tbl1' style='white-space:nowrap'>".$locale['uf_club']."</td>\n";
		echo "<td align='right' class='tbl1'>".$pasirinkimas[$user_data['user_club']]."</td>\n";
		echo "</tr>\n";
	}
} elseif ($profile_method == "validate_insert") {
	$db_fields .= ", user_club";
	$db_values .= ", '".((isset($_POST['user_club'])&&isnum($_POST['user_club'])) ? $_POST['user_club'] : "0")."'";
} elseif ($profile_method == "validate_update") {
	$db_values .= ", user_club='".((isset($_POST['user_club'])&&isnum($_POST['user_club'])) ? $_POST['user_club'] : "0")."'";
}
?>
<?php
if (!defined("IN_FUSION")) { die("Access Denied"); }
 
$user_field_name = $locale['uf_club'];
$user_field_desc = $locale['uf_club_desc'];
$user_field_dbname = "user_club";
$user_field_group = 1;
$user_field_dbinfo = "INT(3) NOT NULL DEFAULT '0'";
?>

Redagavo weberiz· 2011 Rugp. 10 22:08:16