Example #1
0
function RenderUpdatePanel()
{
    $html = "";
    $html .= "<table>";
    $html .= "<tr>";
    $html .= "<td style='padding:3px;width:50px;'>Continent:</td>";
    $html .= "<td  style='padding:3px;'>";
    //Continent
    $html .= "<select id='selContinent' name='selContinent' style='width:100px' onchange='do_update()'>";
    $html .= "<option value='--'>--</option>";
    $result = mysql_query("select ContinentID,ContinentName from kcb_tbcontinents");
    while ($row = mysql_fetch_assoc($result)) {
        $_selected = false;
        if (isset($_POST["selContinent"]) && $_POST["selContinent"] == $row["ContinentID"]) {
            $_selected = true;
        }
        $html .= "<option value='" . $row["ContinentID"] . "' " . ($_selected ? "selected" : "") . ">" . $row["ContinentName"] . "</option>";
    }
    $html .= "</select>";
    $html .= "</td>";
    $html .= "</tr>";
    $html .= "<tr>";
    $html .= "<td  style='padding:3px;'>Country:</td>";
    $html .= "<td  style='padding:3px;'>";
    //Country
    if (isset($_POST["selContinent"]) && $_POST["selContinent"] != "--") {
        $html .= "<select id='selCountry' name='selCountry' style='width:100px' >";
        $html .= "<option value='--'>--</option>";
        $result = mysql_query("select CountryName from kcb_tbcountries where ContinentID=" . $_POST["selContinent"]);
        while ($row = mysql_fetch_assoc($result)) {
            $_selected = false;
            if (isset($_POST["selCountry"]) && $_POST["selCountry"] == $row["CountryName"]) {
                $_selected = true;
            }
            $html .= "<option value='" . $row["CountryName"] . "' " . ($_selected ? "selected" : "") . ">" . $row["CountryName"] . "</option>";
        }
        $html .= "</select>";
    } else {
        $html .= "<select id='selCountry' name='selCountries' style='width:100px' disabled></select>";
    }
    $html .= "</td>";
    $html .= "</tr>";
    $html .= "</table>";
    $myPanel = new UpdatePanel("myPanel");
    $myPanel->content = $html;
    $myPanel->setLoading("../../../../KoolControls/KoolAjax/loading/5.gif");
    return $myPanel->Render();
}
Example #2
0
	$StyleUpdate1->content = content( "picture #1" , "white"   , 50 , 1 , "green"  );
	$StyleUpdate2->content = content( "picture #4" , "#f4f4f4" , 70 , 2 , "orange" );
	$StyleUpdate3->content = content( "picture #3" , "#f4f599" , 55 , 3 , "blue"   );
	$StyleUpdate4->content = content( "picture #9" , "(blank)" , 25 , 4 , "brown"  );	
	// Add the event update for the button  to 4 updatepanel
	$StyleUpdate1->addTrigger( "btn1" , 'onclick' );
	$StyleUpdate2->addTrigger( "btn2" , 'onclick' );
	$StyleUpdate3->addTrigger( "btn3" , 'onclick' );	
	$StyleUpdate4->addTrigger( "btn4" , 'onclick' );
	// 4 UpdatePanel have the same css style
	$StyleUpdate1->cssclass = $StyleUpdate2->cssclass = $StyleUpdate3->cssclass = $StyleUpdate4->cssclass = "cssStyle";	
	// each loading 
	$StyleUpdate1->setLoading("$KoolControlsFolder/KoolAjax/loading/1.gif" , "white"   , 50 );	
	$StyleUpdate2->setLoading("$KoolControlsFolder/KoolAjax/loading/4.gif" , "#f4f4f4" , 70 );	
	$StyleUpdate3->setLoading("$KoolControlsFolder/KoolAjax/loading/3.gif" , "#fff4f5" , 55 );
	$StyleUpdate4->setLoading("$KoolControlsFolder/KoolAjax/loading/9.gif" , ""        , 75 );
?>
	<?php echo $koolajax->Render();?>
		<style>
			.cssStyle
			{
				border:solid 1px gray;
				width:190px;
				float:left;
				height:150px;
				padding : 10px;
				margin : 10px;				
			}
		</style>		
	<div style="width:650px;">			
			<?php					
Example #3
0
	$ksm->styleFolder = $KoolControlsFolder."KoolSlideMenu/styles/darkgray";
	$ksm_expand = $ksm->addParent("root","step1","Step1 : Account information");	
	$ksm->addPanel( "step1", "Pstep1" , echoStep1() ) ;
	$ksm_expand->expand = true ;
	
	$ksm->addParent("root","step2","<span class='hid' id='wstep2' >Step2 : Newsletter options </span>");
	$ksm->addPanel( "step2", "Pstep2" , echoStep2() ) ;
	
	$ksm->addParent("root","step3","<span class='hid' id='wstep3' >Step3 : Terms of use </span>");
	$ksm->addPanel( "step3", "Pstep3" , echoStep3() ) ;
	
	$ksm->singleExpand = true;
	$ksm->width="500px";
	
	$regisForm = new UpdatePanel( "regisForm" ) ;
	$regisForm->setLoading("$KoolControlsFolder/koolajax/loading/1.gif" , "white"   , 50 );	
	$stepDone = ( isset( $_POST["task"] ) && $_POST[ "task" ] == "done" ) ? true : false  ;
	
	if( $stepDone ) {
		$return = '<div style="height:auto;width:500px;" id="registration-form">		
						<div id="my-tit" >Registration form</div><br/>
						<div >';						
		$return .= echoResult( $_POST[ "data" ]) ;
		$return .= '</div>';
	}else{		
		$return = '	<script type="text/javascript" src="functions.js"></script>
					<div style="height:auto;width:500px;" id="registration-form">		
						<div id="my-tit" >Registration form</div><br/>
						<div >'. $ksm->Render().
						'</div>						
						<input type="hidden" name="data" value="" />
Example #4
0
    'st_edu_sel' => key($st_edu)
    ));*/
$KoolControlsFolder = '../../KoolPHPSuite/KoolControls';
require_once $KoolControlsFolder . '/KoolSlideMenu/koolslidemenu.php';
require_once $KoolControlsFolder . '/KoolAjax/koolajax.php';
include_once '../private/class/StuReg/RegPage.php';
$ksm = new KoolSlideMenu("ksm");
$ksm->styleFolder = $KoolControlsFolder . "KoolSlideMenu/styles/apple";
$ksm_expand = $ksm->addParent("root", "step1", "第一步:帐号信息");
$ksm->addPanel("step1", "Pstep1", Step_1());
$ksm->addParent("root", "step2", "<span class='hid' id='wstep2' >第二步 : 用户基本资料 </span>");
$ksm->addPanel("step2", "Pstep2", Step_2());
$ksm->singleExpand = true;
$ksm->width = "100%";
$regisForm = new UpdatePanel("regisForm");
$regisForm->setLoading("../../KoolPHPSuite/KoolControls/KoolAjax/loading/1.gif", "white", 50);
//  $stepDone = ( isset( $_POST["task"] ) && $_POST[ "task" ] == "done" ) ? true : false  ;
$return = ' <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
                <link rel="icon" href="images/StuReg/favicon.ico" type="image/x-icon" />
                <link href="css/common.css" rel="stylesheet" type="text/css" />
                <link href="css/StuReg.css" rel="stylesheet" type="text/css" />
                <link rel="stylesheet" href="jquery-ui/development-bundle/themes/base/jquery.ui.all.css" />
                <script type="text/javascript" src="script/jquery.js"></script> 
                <script type="text/javascript" src="script/common.js"></script>
                <script type="text/javascript" src="script/StuReg.js"></script>
                ' . $ksm->render() . '<script type="text/javascript">
                            ksm.registerEvent("OnBeforeExpand",OnBeforeExpand_handle);
                    </script>

                    ';
$regisForm->cssclass = "cssRegisForm";