Register Register Member Login Member Login Member Login Forgot Password ??
PHP , ASP , ASP.NET, VB.NET, C#, Java , jQuery , Android , iOS , Windows Phone
 

Registered : 109,027

HOME > PHP > PHP Forum > ช่วยด้วยคับมือใหม่มันขึ้น Error in block: /main/Record Login/Error/Button Button_DoLogin ไปแก้ตรงไหนคับ



 

ช่วยด้วยคับมือใหม่มันขึ้น Error in block: /main/Record Login/Error/Button Button_DoLogin ไปแก้ตรงไหนคับ

 



Topic : 070226

Guest




ช่วยด้วยคับมือใหม่มันขึ้น Error in block: /main/Record Login/Error/Button Button_DoLogin ไปแก้ตรงไหนคับ


Code (PHP)
<?php
class clsRecordLogin
{

    public $ComponentType = "Record";
    public $ComponentName = NULL;
    public $Parent = NULL;
    public $HTMLFormAction = NULL;
    public $PressedButton = NULL;
    public $Errors = NULL;
    public $ErrorBlock = NULL;
    public $FormSubmitted = NULL;
    public $FormEnctype = NULL;
    public $Visible = NULL;
    public $IsEmpty = NULL;
    public $CCSEvents = "";
    public $CCSEventResult = NULL;
    public $RelativePath = "";
    public $InsertAllowed = false;
    public $UpdateAllowed = false;
    public $DeleteAllowed = false;
    public $ReadAllowed = false;
    public $EditMode = false;
    public $ds = NULL;
    public $DataSource = NULL;
    public $ValidatingControls = NULL;
    public $Controls = NULL;
    public $Attributes = NULL;

    public function clsRecordLogin( $RelativePath, &$Parent )
    {
        global $FileName;
        global $CCSLocales;
        global $DefaultDateFormat;
        $this->Visible = true;
        $this->Parent =& $Parent;
        $this->RelativePath = $RelativePath;
        $this->Errors = new clsErrors( );
        $this->ErrorBlock = "Record Login/Error";
        $this->ReadAllowed = true;
        if ( $this->Visible )
        {
            $this->ComponentName = "Login";
            $this->Attributes = new clsAttributes( $this->ComponentName.":" );
            $CCSForm = split( ":", CCGetFromGet( "ccsForm", "" ), 2 );
            if ( sizeof( $CCSForm ) == 1 )
            {
                $CCSForm[1] = "";
            }
            list( $FormName, $FormMethod ) = FormName;
            $this->FormEnctype = "application/x-www-form-urlencoded";
            $this->FormSubmitted = $FormName == $this->ComponentName;
            $Method = $this->FormSubmitted ? ccsPost : ccsGet;
            $this->login = new clsControl( ccsTextBox, "login", "login", ccsText, "", CCGetRequestParam( "login", $Method, NULL ), $this );
            $this->login->Required = true;
            $this->password = new clsControl( ccsTextBox, "password", "password", ccsText, "", CCGetRequestParam( "password", $Method, NULL ), $this );
            $this->password->Required = true;
            $this->Button_DoLogin = new clsButton( "Button_DoLogin", $Method, $this );
        }
    }

    public function Validate( )
    {
        global $CCSLocales;
        $Validation = true;
        $Where = "";
        $Validation = $this->login->Validate( ) && $Validation;
        $Validation = $this->password->Validate( ) && $Validation;
        $this->CCSEventResult = CCGetEvent( $this->CCSEvents, "OnValidate", $this );
        $Validation = $Validation && $this->login->Errors->Count( ) == 0;
        $Validation = $Validation && $this->password->Errors->Count( ) == 0;
        return $this->Errors->Count( ) == 0 && $Validation;
    }

    public function CheckErrors( )
    {
        $errors = false;
        $errors = $errors || $this->login->Errors->Count( );
        $errors = $errors || $this->password->Errors->Count( );
        $errors = $errors || $this->Errors->Count( );
        return $errors;
    }

    public function Operation( )
    {
        if ( !$this->Visible )
        {
            return;
        }
        global $Redirect;
        global $FileName;
        if ( !$this->FormSubmitted )
        {
            return;
        }
        if ( $this->FormSubmitted )
        {
            $this->PressedButton = "Button_DoLogin";
            if ( $this->Button_DoLogin->Pressed )
            {
                $this->PressedButton = "Button_DoLogin";
            }
        }
        $Redirect = $FileName;
        if ( $this->Validate( ) )
        {
            if ( $this->PressedButton == "Button_DoLogin" && !CCGetEvent( $this->Button_DoLogin->CCSEvents, "OnClick", $this->Button_DoLogin ) )
            {
                $Redirect = "";
            }
        }
        else
        {
            $Redirect = "";
        }
    }

    public function Show( )
    {
        global $CCSUseAmp;
        global $Tpl;
        global $FileName;
        global $CCSLocales;
        $Error = "";
        if ( !$this->Visible )
        {
            return;
        }
        $this->CCSEventResult = CCGetEvent( $this->CCSEvents, "BeforeSelect", $this );
        $RecordBlock = "Record ".$this->ComponentName;
        $ParentPath = $Tpl->block_path;
        $Tpl->block_path = $ParentPath."/".$RecordBlock;
        $this->EditMode = $this->EditMode && $this->ReadAllowed;
        if ( !$this->FormSubmitted )
        {
        }
        if ( $this->FormSubmitted || $this->CheckErrors( ) )
        {
            $Error = "";
            $Error = ComposeStrings( $Error, $this->login->Errors->ToString( ) );
            $Error = ComposeStrings( $Error, $this->password->Errors->ToString( ) );
            $Error = ComposeStrings( $Error, $this->Errors->ToString( ) );
            $Tpl->SetVar( "Error", $Error );
            $Tpl->Parse( "Error", false );
        }
        $CCSForm = $this->EditMode ? $this->ComponentName.":"."Edit" : $this->ComponentName;
        $this->HTMLFormAction = $FileName."?".CCAddParam( CCGetQueryString( "QueryString", "" ), "ccsForm", $CCSForm );
        $Tpl->SetVar( "Action", !$CCSUseAmp ? $this->HTMLFormAction : str_replace( "&", "&amp;", $this->HTMLFormAction ) );
        $Tpl->SetVar( "HTMLFormName", $this->ComponentName );
        $Tpl->SetVar( "HTMLFormEnctype", $this->FormEnctype );
        $this->CCSEventResult = CCGetEvent( $this->CCSEvents, "BeforeShow", $this );
        $this->Attributes->Show( );
        if ( !$this->Visible )
        {
            $Tpl->block_path = $ParentPath;
        }
        else
        {
            $this->login->Show( );
            $this->password->Show( );
            $this->Button_DoLogin->Show( );
            $Tpl->parse( );
            $Tpl->block_path = $ParentPath;
        }
    }

}

define( "RelativePath", "." );
define( "PathToCurrentPage", "/" );
define( "FileName", "login.php" );
include( RelativePath."/Common.php" );
include( RelativePath."/Template.php" );
include( RelativePath."/Sorter.php" );
include( RelativePath."/Navigator.php" );
$FileName = "";
$Redirect = "";
$Tpl = "";
$TemplateFileName = "";
$BlockToParse = "";
$ComponentName = "";
$Attributes = "";
$CCSEvents = "";
$CCSEventResult = "";
$FileName = FileName;
$Redirect = "";
$TemplateFileName = "login.html";
$BlockToParse = "main";
$TemplateEncoding = "CP874";
$PathToRoot = "./";
include( "./login_events.php" );
$CCSEventResult = CCGetEvent( $CCSEvents, "BeforeInitialize", $MainPage );
$Attributes = new clsAttributes( "page:" );
$MainPage->Attributes =& $Attributes;
$Login = new clsRecordLogin( "", $MainPage );
$MainPage->Login =& $Login;
BindEvents( );
$CCSEventResult = CCGetEvent( $CCSEvents, "AfterInitialize", $MainPage );
$Charset = $Charset ? $Charset : "windows-874";
if ( $Charset )
{
    header( "Content-Type: text/html; charset=".$Charset );
}
$CCSEventResult = CCGetEvent( $CCSEvents, "OnInitializeView", $MainPage );
$Tpl = new clsTemplate( $FileEncoding, $TemplateEncoding );
$Tpl->LoadTemplate( PathToCurrentPage.$TemplateFileName, $BlockToParse, "CP874" );
$Tpl->block_path = "/{$BlockToParse}";
$CCSEventResult = CCGetEvent( $CCSEvents, "BeforeShow", $MainPage );
$Attributes->Show( );
$Login->Operation( );
if ( $Redirect )
{
    $CCSEventResult = CCGetEvent( $CCSEvents, "BeforeUnload", $MainPage );
    if ( $CCSFormFilter )
    {
        $Redirect = CCAddParam( $Redirect, "FormFilter", $CCSFormFilter );
    }
    header( "Location: ".$Redirect );
    unset( $Login );
    unset( $Tpl );
    exit( );
}
$Login->Show( );
$Tpl->block_path = "";
$Tpl->Parse( $BlockToParse, false );
$main_block = $Tpl->GetVar( $BlockToParse );
$CCSEventResult = CCGetEvent( $CCSEvents, "BeforeOutput", $MainPage );
if ( $CCSEventResult )
{
    echo $main_block;
}
$CCSEventResult = CCGetEvent( $CCSEvents, "BeforeUnload", $MainPage );
unset( $Login );
unset( $Tpl );
?>




Tag : PHP







Move To Hilight (Stock) 
Send To Friend.Bookmark.
Date : 2011-12-12 15:50:00 By : วิศรุต View : 853 Reply : 1
 

 

No. 1



โพสกระทู้ ( 74,058 )
บทความ ( 838 )

สมาชิกที่ใส่เสื้อไทยครีเอท

สถานะออฟไลน์
Twitter Facebook

อันนี้ Source ของอะไรครับ






แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2011-12-12 16:53:23 By : webmaster
 

   

ค้นหาข้อมูล


   
 

แสดงความคิดเห็น
Re : ช่วยด้วยคับมือใหม่มันขึ้น Error in block: /main/Record Login/Error/Button Button_DoLogin ไปแก้ตรงไหนคับ
 
 
รายละเอียด
 
ตัวหนา ตัวเอียง ตัวขีดเส้นใต้ ตัวมีขีดกลาง| ตัวเรืองแสง ตัวมีเงา ตัวอักษรวิ่ง| จัดย่อหน้าอิสระ จัดย่อหน้าชิดซ้าย จัดย่อหน้ากึ่งกลาง จัดย่อหน้าชิดขวา| เส้นขวาง| ขนาดตัวอักษร แบบตัวอักษร
ใส่แฟลช ใส่รูป ใส่ไฮเปอร์ลิ้งค์ ใส่อีเมล์ ใส่ลิ้งค์ FTP| ใส่แถวของตาราง ใส่คอลัมน์ตาราง| ตัวยก ตัวห้อย ตัวพิมพ์ดีด| ใส่โค้ด ใส่การอ้างถึงคำพูด| ใส่ลีสต์
smiley for :lol: smiley for :ken: smiley for :D smiley for :) smiley for ;) smiley for :eek: smiley for :geek: smiley for :roll: smiley for :erm: smiley for :cool: smiley for :blank: smiley for :idea: smiley for :ehh: smiley for :aargh: smiley for :evil:
Insert PHP Code
Insert ASP Code
Insert VB.NET Code Insert C#.NET Code Insert JavaScript Code Insert C#.NET Code
Insert Java Code
Insert Android Code
Insert Objective-C Code
Insert XML Code
Insert SQL Code
Insert Code
เพื่อความเรียบร้อยของข้อความ ควรจัดรูปแบบให้พอดีกับขนาดของหน้าจอ เพื่อง่ายต่อการอ่านและสบายตา และตรวจสอบภาษาไทยให้ถูกต้อง

อัพโหลดแทรกรูปภาพ

Notice

เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ
อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง

   
  เพื่อความปลอดภัยและการตรวจสอบ กระทู้ที่แทรกไฟล์อัพโหลดไฟล์จากที่อื่น อาจจะถูกลบทิ้ง
 
โดย
อีเมล์
บวกค่าให้ถูก
<= ตัวเลขฮินดูอารบิก เช่น 123 (หรือล็อกอินเข้าระบบสมาชิกเพื่อไม่ต้องกรอก)







Exchange: นำเข้าสินค้าจากจีน, Taobao, เฟอร์นิเจอร์, ของพรีเมี่ยม, ร่ม, ปากกา, power bank, แฟลชไดร์ฟ, กระบอกน้ำ

Load balance : Server 00
ThaiCreate.Com Logo
© www.ThaiCreate.Com. 2003-2024 All Rights Reserved.
ไทยครีเอทบริการ จัดทำดูแลแก้ไข Web Application ทุกรูปแบบ (PHP, .Net Application, VB.Net, C#)
[Conditions Privacy Statement] ติดต่อโฆษณา 081-987-6107 อัตราราคา คลิกที่นี่