<?php

include("inc.top.php");

	get_logged_info();
	$member_id=$q->f("id");

$q2=new Cdb;
	$t->set_file("content", "admin.settings.html");

	$t->set_file("setting", "admin.settings.row.html");

	$query="select * from settings where box_type!='hidden' order by id";

	$q->query($query);

	while ($q->next_record())

	{


		if ($q->f("box_type")=="input")

		{

			$set='<input type="text" name="'.$q->f("name").'" value="'.stripslashes($q->f("value")).'" size="40">';

			$desc=$q->f("description");

		}

		if ($q->f("box_type")=="hidden")

		{
			$set='<input type="hidden" name="'.$q->f("name").'" value="'.$q->f("value").'">';
			$desc='';
		}



		
		$t->set_var("setting_box", $set);

		$t->set_var("setting_description", stripslashes(stripslashes($desc)));

		$t->parse("settings_list", "setting", true);

	}

	$q->query("SELECT aff_url FROM members WHERE id='$member_id'");
	$q->next_record();

	$t->set_var("aff_link", $q->f('aff_url'));

include("inc.bottom.php");

?>