summaryrefslogtreecommitdiff
path: root/demos
diff options
context:
space:
mode:
Diffstat (limited to 'demos')
-rwxr-xr-xdemos/blog-tutorial/protected/pages/Day1/CreateContact.page31
-rwxr-xr-xdemos/blog-tutorial/protected/pages/Day1/Setup.page5
-rwxr-xr-xdemos/blog-tutorial/protected/pages/Day1/ShareLayout.page2
-rwxr-xr-xdemos/blog-tutorial/protected/pages/Day1/fr/CreateContact.page33
-rwxr-xr-xdemos/blog-tutorial/protected/pages/Day1/fr/Setup.page7
-rwxr-xr-xdemos/blog-tutorial/protected/pages/Day1/fr/ShareLayout.page4
-rwxr-xr-xdemos/blog-tutorial/protected/pages/Day1/id/CreateContact.page31
-rwxr-xr-xdemos/blog-tutorial/protected/pages/Day1/id/Setup.page5
-rwxr-xr-xdemos/blog-tutorial/protected/pages/Day1/id/ShareLayout.page2
-rwxr-xr-xdemos/quickstart/protected/pages/Controls/Samples/TTextHighlighter/Home.page1
-rwxr-xr-xdemos/quickstart/protected/pages/Controls/TextHighlighter.page1
-rwxr-xr-xdemos/quickstart/protected/pages/Controls/id/TextHighlighter.page1
-rwxr-xr-xdemos/quickstart/protected/pages/Tutorial/AjaxChat.page1
-rwxr-xr-xdemos/quickstart/protected/pages/Tutorial/CurrencyConverter.page63
-rwxr-xr-xdemos/quickstart/protected/pages/Tutorial/fr/AjaxChat.page1
-rwxr-xr-xdemos/quickstart/protected/pages/Tutorial/fr/CurrencyConverter.page63
-rwxr-xr-xdemos/quickstart/protected/pages/Tutorial/id/AjaxChat.page1
-rwxr-xr-xdemos/quickstart/protected/pages/Tutorial/id/CurrencyConverter.page73
-rwxr-xr-xdemos/sqlmap/protected/pages/Manual/Tutorial/TestFirst.page7
-rwxr-xr-xdemos/sqlmap/protected/pages/Manual/Tutorial/TestSecond.page2
20 files changed, 154 insertions, 180 deletions
diff --git a/demos/blog-tutorial/protected/pages/Day1/CreateContact.page b/demos/blog-tutorial/protected/pages/Day1/CreateContact.page
index 28ad4b21..0d9fc026 100755
--- a/demos/blog-tutorial/protected/pages/Day1/CreateContact.page
+++ b/demos/blog-tutorial/protected/pages/Day1/CreateContact.page
@@ -45,11 +45,11 @@ We use template to organize the presentational layout of the feedback form. In t
<h1>Contact</h1>
<p>Please fill out the following form to let me know your feedback on my blog. Thanks!</p>
-&lt;com:TForm>
+&lt;com:TForm>
<span>Your Name:</span>
&lt;com:TRequiredFieldValidator ControlToValidate="Name"
- ErrorMessage="Please provide your name."
+ ErrorMessage="Please provide your name."
Display="Dynamic" />
<br/>
&lt;com:TTextBox ID="Name" />
@@ -57,10 +57,10 @@ We use template to organize the presentational layout of the feedback form. In t
<br/>
<span>Your Email:</span>
&lt;com:TRequiredFieldValidator ControlToValidate="Email"
- ErrorMessage="Please provide your email address."
+ ErrorMessage="Please provide your email address."
Display="Dynamic" />
&lt;com:TEmailAddressValidator ControlToValidate="Email"
- ErrorMessage="You entered an invalid email address."
+ ErrorMessage="You entered an invalid email address."
Display="Dynamic" />
<br/>
&lt;com:TTextBox ID="Email" />
@@ -68,11 +68,11 @@ We use template to organize the presentational layout of the feedback form. In t
<br/>
<span>Feedback:</span>
&lt;com:TRequiredFieldValidator ControlToValidate="Feedback"
- ErrorMessage="Please provide your feedback."
+ ErrorMessage="Please provide your feedback."
Display="Dynamic" />
<br/>
-&lt;com:TTextBox ID="Feedback"
- TextMode="MultiLine"
+&lt;com:TTextBox ID="Feedback"
+ TextMode="MultiLine"
Rows="10"
Columns="40" />
@@ -99,13 +99,13 @@ Besides <tt>TTextBox</tt> controls, the template also uses many validator contro
<com:TTextHighlighter CssClass="source" Language="prado">
<span>Your Email:</span>
-&lt;com:TRequiredFieldValidator
+&lt;com:TRequiredFieldValidator
ControlToValidate="Email"
- ErrorMessage="Please provide your email address."
+ ErrorMessage="Please provide your email address."
Display="Dynamic" />
-&lt;com:TEmailAddressValidator
+&lt;com:TEmailAddressValidator
ControlToValidate="Email"
- ErrorMessage="You entered an invalid email address."
+ ErrorMessage="You entered an invalid email address."
Display="Dynamic" />
<br/>
&lt;com:TTextBox ID="Email" />
@@ -152,28 +152,27 @@ class Contact extends TPage
/**
* Event handler for the OnClick event of the submit button.
* @param TButton the button triggering the event
- * @param TEventParameter event parameter (null here)
+ * @param TEventParameter event parameter (null here)
*/
public function submitButtonClicked($sender, $param)
{
if ($this->IsValid) // check if input validation is successful
{
// obtain the user name, email, feedback from the textboxes
- $name = $this->Name->Text;
+ $name = $this->Name->Text;
$email = $this->Email->Text;
$feedback = $this->Feedback->Text;
-
+
// send an email to administrator with the above information
$this->mailFeedback($name, $email, $feedback);
}
}
-
+
protected function mailFeedback($name, $email, $feedback)
{
// implementation of sending the feedback email
}
}
-?>
</com:TTextHighlighter>
<p>
diff --git a/demos/blog-tutorial/protected/pages/Day1/Setup.page b/demos/blog-tutorial/protected/pages/Day1/Setup.page
index e8316253..582d0399 100755
--- a/demos/blog-tutorial/protected/pages/Day1/Setup.page
+++ b/demos/blog-tutorial/protected/pages/Day1/Setup.page
@@ -52,7 +52,6 @@ require_once('path/to/prado.php');
$application = new TApplication;
// run the application and handle user requests
$application->run();
-?>
</com:TTextHighlighter>
<com:InfoBox>
@@ -148,8 +147,8 @@ To change the location of the root page directory and change the name of homepag
<?xml version="1.0" encoding="utf-8"?>
<application id="blog" mode="Debug">
<services>
- <service id="page"
- class="TPageService"
+ <service id="page"
+ class="TPageService"
BasePath="path.to.pages"
DefaultPage="NewHome"
/>
diff --git a/demos/blog-tutorial/protected/pages/Day1/ShareLayout.page b/demos/blog-tutorial/protected/pages/Day1/ShareLayout.page
index 9cd0410b..6115ef22 100755
--- a/demos/blog-tutorial/protected/pages/Day1/ShareLayout.page
+++ b/demos/blog-tutorial/protected/pages/Day1/ShareLayout.page
@@ -66,7 +66,6 @@ The class file <tt>MainLayout.php</tt> is very simple:
class MainLayout extends TTemplateControl
{
}
-?>
</com:TTextHighlighter>
<com:InfoBox>
@@ -145,7 +144,6 @@ class Contact extends TPage
// ...
}
-?>
</com:TTextHighlighter>
<p>
diff --git a/demos/blog-tutorial/protected/pages/Day1/fr/CreateContact.page b/demos/blog-tutorial/protected/pages/Day1/fr/CreateContact.page
index e85d8bfe..0105f656 100755
--- a/demos/blog-tutorial/protected/pages/Day1/fr/CreateContact.page
+++ b/demos/blog-tutorial/protected/pages/Day1/fr/CreateContact.page
@@ -45,11 +45,11 @@ Nous utilisons un fichier gabarit pour organiser la présentation de notre formu
<h1>Contact</h1>
<p>Veuillez remplir le formulaire suivant pour me laisser vos impressions au sujet de mon blog. Merci !</p>
-&lt;com:TForm>
+&lt;com:TForm>
<span>Votre nom:</span>
&lt;com:TRequiredFieldValidator ControlToValidate="Name"
- ErrorMessage="Veuillez indiquer votre nom."
+ ErrorMessage="Veuillez indiquer votre nom."
Display="Dynamic" />
<br/>
&lt;com:TTextBox ID="Name" />
@@ -57,10 +57,10 @@ Nous utilisons un fichier gabarit pour organiser la présentation de notre formu
<br/>
<span>Votre email:</span>
&lt;com:TRequiredFieldValidator ControlToValidate="Email"
- ErrorMessage="Veuillez indiquer votre email."
+ ErrorMessage="Veuillez indiquer votre email."
Display="Dynamic" />
&lt;com:TEmailAddressValidator ControlToValidate="Email"
- ErrorMessage="Vous avez saisi un email invalide."
+ ErrorMessage="Vous avez saisi un email invalide."
Display="Dynamic" />
<br/>
&lt;com:TTextBox ID="Email" />
@@ -68,11 +68,11 @@ Nous utilisons un fichier gabarit pour organiser la présentation de notre formu
<br/>
<span>Commentaires:</span>
&lt;com:TRequiredFieldValidator ControlToValidate="Feedback"
- ErrorMessage="Veuillez saisir un commentaire."
+ ErrorMessage="Veuillez saisir un commentaire."
Display="Dynamic" />
<br/>
-&lt;com:TTextBox ID="Feedback"
- TextMode="MultiLine"
+&lt;com:TTextBox ID="Feedback"
+ TextMode="MultiLine"
Rows="10"
Columns="40" />
@@ -99,13 +99,13 @@ Avant le contrôle <tt>TTextBox</tt>, le gabarit utilise aussi plusieurs validat
<com:TTextHighlighter CssClass="source" Language="prado">
<span>Your Email:</span>
-&lt;com:TRequiredFieldValidator
+&lt;com:TRequiredFieldValidator
ControlToValidate="Email"
- ErrorMessage="Veuillez indiquer votre email."
+ ErrorMessage="Veuillez indiquer votre email."
Display="Dynamic" />
-&lt;com:TEmailAddressValidator
+&lt;com:TEmailAddressValidator
ControlToValidate="Email"
- ErrorMessage="Vous avez saisi un email invalide."
+ ErrorMessage="Vous avez saisi un email invalide."
Display="Dynamic" />
<br/>
&lt;com:TTextBox ID="Email" />
@@ -152,28 +152,27 @@ class Contact extends TPage
/**
* Gestionnaire d'évènement pour OnClick (bouton submit).
* @param TButton le bouton qui a générer l'évènement
- * @param TEventParameter les paramètres de l'évènement (null dans ce cas)
+ * @param TEventParameter les paramètres de l'évènement (null dans ce cas)
*/
public function submitButtonClicked($sender, $param)
{
if ($this->IsValid) // vérifie que les validations sont Ok
{
// récupère le nom de l'utilisateur, son email et son commentaire
- $name = $this->Name->Text;
+ $name = $this->Name->Text;
$email = $this->Email->Text;
$feedback = $this->Feedback->Text;
-
- // envoie un email à l'administrateur avec les informations
+
+ // envoie un email à l'administrateur avec les informations
$this->mailFeedback($name, $email, $feedback);
}
}
-
+
protected function mailFeedback($name, $email, $feedback)
{
// implémentation de l'envoi de l'email
}
}
-?>
</com:TTextHighlighter>
<p>
diff --git a/demos/blog-tutorial/protected/pages/Day1/fr/Setup.page b/demos/blog-tutorial/protected/pages/Day1/fr/Setup.page
index 22a7891c..0be1c1f0 100755
--- a/demos/blog-tutorial/protected/pages/Day1/fr/Setup.page
+++ b/demos/blog-tutorial/protected/pages/Day1/fr/Setup.page
@@ -49,11 +49,10 @@ require_once('path/to/prado.php');
$application = new TApplication;
// run the application and handle user requests
$application->run();
-?>
</com:TTextHighlighter>
<com:InfoBox>
-Le nom du script ne doit pas être obligatoirement <tt>index.php</tt>. Il peut porter n'importe quel nom à partir du moment ou le serveur peut l'interpréter comme étant un script PHP5. Par exemple, sur certains hébergements mutualisés, le script devra porter le nom <tt>index.php5</tt>, ce qui permettra au serveur Web de le traiter correctement.
+Le nom du script ne doit pas être obligatoirement <tt>index.php</tt>. Il peut porter n'importe quel nom à partir du moment ou le serveur peut l'interpréter comme étant un script PHP5. Par exemple, sur certains hébergements mutualisés, le script devra porter le nom <tt>index.php5</tt>, ce qui permettra au serveur Web de le traiter correctement.
</com:InfoBox>
<h3>Le fichier de configuration de l'application</h3>
@@ -145,8 +144,8 @@ Pour changer l'emplacement du dossier racine des pages et le nom de la page d'ac
<?xml version="1.0" encoding="utf-8"?>
<application id="blog" mode="Debug">
<services>
- <service id="page"
- class="TPageService"
+ <service id="page"
+ class="TPageService"
BasePath="path.to.pages"
DefaultPage="NewHome"
/>
diff --git a/demos/blog-tutorial/protected/pages/Day1/fr/ShareLayout.page b/demos/blog-tutorial/protected/pages/Day1/fr/ShareLayout.page
index cefff770..539b8376 100755
--- a/demos/blog-tutorial/protected/pages/Day1/fr/ShareLayout.page
+++ b/demos/blog-tutorial/protected/pages/Day1/fr/ShareLayout.page
@@ -68,7 +68,6 @@ Le fichier de classe <tt>MainLayout.php</tt> est très simple :
class MainLayout extends TTemplateControl
{
}
-?>
</com:TTextHighlighter>
<com:InfoBox>
@@ -147,13 +146,12 @@ class Contact extends TPage
// ...
}
-?>
</com:TTextHighlighter>
<p>
Ci-dessus, nous indiquons d'utiliser le gabarit principal <tt>MasterClass</tt> dans la méthode <tt>onPreInit()</tt> qui est héritée de <tt>TPage</tt>. Cette méthode est appelé par PRADO juste après que l'instance de la page soit créée. Nous pouvons ainsi déclarer au moment où la page est requise quel gabarit principal utiliser. Par exemple, quand la page est requise par un utilisateur enregistré, nous pouvons utiliser le gabarit A, et le gabarit B si l'utilisateur qui demande la page est un invité.
</p>
-
+
<p>
Nous pouvons aussi spécifier quel gabarit principal utiliser dans le fichier de <a href="http://www.pradosoft.com/demos/quickstart/?page=Configurations.AppConfig">configuration de l'application</a> ou encore dans le fichier de <a href="http://www.pradosoft.com/demos/quickstart/?page=Configurations.PageConfig">configuration de la page</a>. Ci-dessous, le fichier de configuration de l'application modifié pour notre blog.
</p>
diff --git a/demos/blog-tutorial/protected/pages/Day1/id/CreateContact.page b/demos/blog-tutorial/protected/pages/Day1/id/CreateContact.page
index 65be6417..caee30d0 100755
--- a/demos/blog-tutorial/protected/pages/Day1/id/CreateContact.page
+++ b/demos/blog-tutorial/protected/pages/Day1/id/CreateContact.page
@@ -45,11 +45,11 @@ Kita menggunakan template untuk menghatur tata letak penyajian terhadap formulir
<h1>Contact</h1>
<p>Please fill out the following form to let me know your feedback on my blog. Thanks!</p>
-&lt;com:TForm>
+&lt;com:TForm>
<span>Your Name:</span>
&lt;com:TRequiredFieldValidator ControlToValidate="Name"
- ErrorMessage="Please provide your name."
+ ErrorMessage="Please provide your name."
Display="Dynamic" />
<br/>
&lt;com:TTextBox ID="Name" />
@@ -57,10 +57,10 @@ Kita menggunakan template untuk menghatur tata letak penyajian terhadap formulir
<br/>
<span>Your Email:</span>
&lt;com:TRequiredFieldValidator ControlToValidate="Email"
- ErrorMessage="Please provide your email address."
+ ErrorMessage="Please provide your email address."
Display="Dynamic" />
&lt;com:TEmailAddressValidator ControlToValidate="Email"
- ErrorMessage="You entered an invalid email address."
+ ErrorMessage="You entered an invalid email address."
Display="Dynamic" />
<br/>
&lt;com:TTextBox ID="Email" />
@@ -68,11 +68,11 @@ Kita menggunakan template untuk menghatur tata letak penyajian terhadap formulir
<br/>
<span>Feedback:</span>
&lt;com:TRequiredFieldValidator ControlToValidate="Feedback"
- ErrorMessage="Please provide your feedback."
+ ErrorMessage="Please provide your feedback."
Display="Dynamic" />
<br/>
-&lt;com:TTextBox ID="Feedback"
- TextMode="MultiLine"
+&lt;com:TTextBox ID="Feedback"
+ TextMode="MultiLine"
Rows="10"
Columns="40" />
@@ -99,13 +99,13 @@ Selain kontrol <tt>TTextBox</tt>, template juga menggunakan banyak kontrol valid
<com:TTextHighlighter CssClass="source" Language="prado">
<span>Your Email:</span>
-&lt;com:TRequiredFieldValidator
+&lt;com:TRequiredFieldValidator
ControlToValidate="Email"
- ErrorMessage="Please provide your email address."
+ ErrorMessage="Please provide your email address."
Display="Dynamic" />
-&lt;com:TEmailAddressValidator
+&lt;com:TEmailAddressValidator
ControlToValidate="Email"
- ErrorMessage="You entered an invalid email address."
+ ErrorMessage="You entered an invalid email address."
Display="Dynamic" />
<br/>
&lt;com:TTextBox ID="Email" />
@@ -152,28 +152,27 @@ class Contact extends TPage
/**
* Pengendali event untuk event OnClick pada tombol submit.
* @param TButton tombol yang memicu event
- * @param TEventParameter parameter event (null di sini)
+ * @param TEventParameter parameter event (null di sini)
*/
public function submitButtonClicked($sender, $param)
{
if ($this->IsValid) // memeriksa apakan validasi input berhasil
{
// mendapatkan nama pengguna, email, umpan balik dari kotak teks
- $name = $this->Name->Text;
+ $name = $this->Name->Text;
$email = $this->Email->Text;
$feedback = $this->Feedback->Text;
-
+
// mengirimkan email ke administrator dengan informasi di atas
$this->mailFeedback($name, $email, $feedback);
}
}
-
+
protected function mailFeedback($name, $email, $feedback)
{
// implementasi pengiriman email umpan balik
}
}
-?>
</com:TTextHighlighter>
<p>
diff --git a/demos/blog-tutorial/protected/pages/Day1/id/Setup.page b/demos/blog-tutorial/protected/pages/Day1/id/Setup.page
index edc469d5..45ae8cf5 100755
--- a/demos/blog-tutorial/protected/pages/Day1/id/Setup.page
+++ b/demos/blog-tutorial/protected/pages/Day1/id/Setup.page
@@ -52,7 +52,6 @@ require_once('path/to/prado.php');
$application = new TApplication;
// jalankan aplikasi dan tangani permintaan pengguna
$application->run();
-?>
</com:TTextHighlighter>
<com:InfoBox>
@@ -148,8 +147,8 @@ Untuk membuat lokasi akar direktori halaman dan mengubah nama homepage, seseoran
<?xml version="1.0" encoding="utf-8"?>
<application id="blog" mode="Debug">
<services>
- <service id="page"
- class="TPageService"
+ <service id="page"
+ class="TPageService"
BasePath="path.to.pages"
DefaultPage="NewHome"
/>
diff --git a/demos/blog-tutorial/protected/pages/Day1/id/ShareLayout.page b/demos/blog-tutorial/protected/pages/Day1/id/ShareLayout.page
index d505beed..0c40181b 100755
--- a/demos/blog-tutorial/protected/pages/Day1/id/ShareLayout.page
+++ b/demos/blog-tutorial/protected/pages/Day1/id/ShareLayout.page
@@ -66,7 +66,6 @@ File kelas <tt>MainLayout.php</tt> sangat sederhana:
class MainLayout extends TTemplateControl
{
}
-?>
</com:TTextHighlighter>
<com:InfoBox>
@@ -145,7 +144,6 @@ class Contact extends TPage
// ...
}
-?>
</com:TTextHighlighter>
<p>
diff --git a/demos/quickstart/protected/pages/Controls/Samples/TTextHighlighter/Home.page b/demos/quickstart/protected/pages/Controls/Samples/TTextHighlighter/Home.page
index 9bd86078..c7506c67 100755
--- a/demos/quickstart/protected/pages/Controls/Samples/TTextHighlighter/Home.page
+++ b/demos/quickstart/protected/pages/Controls/Samples/TTextHighlighter/Home.page
@@ -12,7 +12,6 @@ Highlighting PHP statements:
$str = 'one|two|three|four';
// will output an array
print_r(explode('|', $str, 2));
-?>
</com:TTextHighlighter>
</td></tr>
diff --git a/demos/quickstart/protected/pages/Controls/TextHighlighter.page b/demos/quickstart/protected/pages/Controls/TextHighlighter.page
index 1babbb33..5d3428f9 100755
--- a/demos/quickstart/protected/pages/Controls/TextHighlighter.page
+++ b/demos/quickstart/protected/pages/Controls/TextHighlighter.page
@@ -17,7 +17,6 @@ To use <tt>TTextHighlighter</tt>, simply enclose the contents to be syntax highl
<?php
$str = 'one|two|three|four';
print_r(explode('|', $str, 2)); // will output an array
-?>
&lt;/com:TTextHighlighter&gt;
</com:TTextHighlighter>
diff --git a/demos/quickstart/protected/pages/Controls/id/TextHighlighter.page b/demos/quickstart/protected/pages/Controls/id/TextHighlighter.page
index b2b500b0..b1bb4ce7 100755
--- a/demos/quickstart/protected/pages/Controls/id/TextHighlighter.page
+++ b/demos/quickstart/protected/pages/Controls/id/TextHighlighter.page
@@ -17,7 +17,6 @@ Untuk menggunakan <tt>TTextHighlighter</tt>, cukup kurung konten yang sintaksnya
<?php
$str = 'one|two|three|four';
print_r(explode('|', $str, 2)); // akan mengeluarkan array
-?>
&lt;/com:TTextHighlighter&gt;
</com:TTextHighlighter>
diff --git a/demos/quickstart/protected/pages/Tutorial/AjaxChat.page b/demos/quickstart/protected/pages/Tutorial/AjaxChat.page
index 4a8f23ab..92118720 100755
--- a/demos/quickstart/protected/pages/Tutorial/AjaxChat.page
+++ b/demos/quickstart/protected/pages/Tutorial/AjaxChat.page
@@ -59,7 +59,6 @@ php prado/framework/prado-cli.php -c chat
class Login extends TPage
{
}
-?&gt;
</com:TTextHighlighter>
<com:TTextHighlighter Language="prado" CssClass="source block-content" id="code_90029">
<!doctype html public "-//W3C//DTD XHTML 1.0 Strict//EN"
diff --git a/demos/quickstart/protected/pages/Tutorial/CurrencyConverter.page b/demos/quickstart/protected/pages/Tutorial/CurrencyConverter.page
index 4bec2a28..1abd68b9 100755
--- a/demos/quickstart/protected/pages/Tutorial/CurrencyConverter.page
+++ b/demos/quickstart/protected/pages/Tutorial/CurrencyConverter.page
@@ -34,9 +34,9 @@
<tt>currency-converter</tt> in your current working directory.
You may need to change to the appropriate directory
first.
- See the <a href="?page=GettingStarted.CommandLine">Command Line Tool</a>
- for more details.
- </p>
+ See the <a href="?page=GettingStarted.CommandLine">Command Line Tool</a>
+ for more details.
+ </p>
<com:TTextHighlighter Language="text" CssClass="source block-content" id="code111">
php prado/framework/prado-cli.php -c currency-converter
</com:TTextHighlighter>
@@ -52,7 +52,7 @@ php prado/framework/prado-cli.php -c currency-converter
<p id="80058" class="block-content">We start by editing the <tt>Home.page</tt> file found in the
<tt>currency-converter/protected/pages/</tt> directory. Files ending
with ".page" are page templates that contains HTML and Prado controls.
- We simply add two textboxes, three labels and one button as follows.
+ We simply add two textboxes, three labels and one button as follows.
</p>
<com:TTextHighlighter Language="prado" CssClass="source block-content" id="form1">
&lt;com:TForm&gt;
@@ -75,7 +75,7 @@ php prado/framework/prado-cli.php -c currency-converter
</div>
</fieldset>
&lt;/com:TForm&gt;
-</com:TTextHighlighter>
+</com:TTextHighlighter>
<p id="refresh" class="block-content">
If you refresh the page, you should see something similar to the following figure.
It may not look very pretty or orderly, but we shall change that later using CSS.
@@ -125,7 +125,7 @@ php prado/framework/prado-cli.php -c currency-converter
to add a "Home.php" to where "Home.page" is. The <tt>Home</tt> class
should extends the
<com:DocLink ClassPath="System.Web.UI.TPage" Text="TPage" />, the default base
- class for all Prado pages.
+ class for all Prado pages.
</p>
<com:TTextHighlighter Language="php" CssClass="source block-content" id="code3">
&lt;?php
@@ -133,8 +133,7 @@ class Home extends TPage
{
}
-?&gt;
-</com:TTextHighlighter>
+</com:TTextHighlighter>
<p id="1111" class="block-content">
Prado uses PHP's <tt>__autoload</tt> method to load classes. The convention
is to use the class name with ".php" extension as filename.
@@ -151,15 +150,15 @@ class Home extends TPage
the converted total. To handle the user clicking of the "Convert" button
we simply add an <tt>OnClick</tt> property to the "Convert" button in
the "Home.page" template and add a corresponding event handler method
- in the "Home.php".
+ in the "Home.php".
</p>
<com:TTextHighlighter Language="prado" CssClass="source block-content" id="code4">
&lt;com:TButton Text="Convert" OnClick="convert_clicked" /&gt;
</com:TTextHighlighter>
- <p id="222" class="block-content">
+ <p id="222" class="block-content">
The value of the <tt>OnClick</tt>, "<tt>convert_clicked</tt>", will be the method
name in the "Home.php" that will called when the user clicks on the
- "Convert" button.
+ "Convert" button.
</p>
<com:TTextHighlighter Language="php" CssClass="source block-content" id="code5">
class Home extends TPage
@@ -171,8 +170,8 @@ class Home extends TPage
$this->total->Text = $rate * $dollars;
}
}
-</com:TTextHighlighter>
-<div id="3332" class="block-content">
+</com:TTextHighlighter>
+<div id="3332" class="block-content">
<p id="333">
If you run the application in your web browser, enter some values and click
the "Convert" button then you should see that calculated value displayed next
@@ -186,24 +185,24 @@ class Home extends TPage
</p>
<p id="80067">We shall now examine, the three lines that implements the simply currency
- conversion in the "<tt>convert_clicked</tt>" method.
- </p>
+ conversion in the "<tt>convert_clicked</tt>" method.
+ </p>
</div>
<com:TTextHighlighter Language="php" CssClass="source block-content" id="code6" >
$rate = floatval($this->currencyRate->Text);
-</com:TTextHighlighter>
+</com:TTextHighlighter>
<p id="444" class="block-content">
The statement <tt>$this->currencyRate</tt> corresponds to the
<tt>TTextBox</tt> component with <tt>ID</tt> value "currencyRate" in the
"Home.page" template. The <tt>Text</tt> property of the <tt>TTextBox</tt>
contains the value that the user entered. So, we obtain this
value by <tt>$this->currencyRate->Text</tt> which we convert the
- value to a float value.
+ value to a float value.
</p>
<com:TTextHighlighter Language="php" CssClass="source block-content" id="code7">
$dollars = floatval($this->dollars->Text);
-</com:TTextHighlighter>
-<div id="5551" class="block-content">
+</com:TTextHighlighter>
+<div id="5551" class="block-content">
<p id="555">
The next line does a similar things, it takes the user value from
the <tt>TTextBox</tt> with <tt>ID</tt> value "dollars and converts it to
@@ -212,9 +211,9 @@ $dollars = floatval($this->dollars->Text);
<p id="80068">The third line calculates the new amount and set this value in the
<tt>Text</tt> property of the <tt>TLabel</tt> with <tt>ID="total"</tt>.
- Thus, we display the new amount to the user in the label.
+ Thus, we display the new amount to the user in the label.
</p>
-</div>
+</div>
<com:TTextHighlighter Language="php" CssClass="source block-content" id="code8">
$this->total->Text = $rate * $dollars;
</com:TTextHighlighter>
@@ -233,14 +232,14 @@ $this->total->Text = $rate * $dollars;
<li>the user enters a value,</li>
<li>the currency rate is a valid number,</li>
<li>the currency rate is positive.</li>
- </ol>
+ </ol>
<p id="666" class="block-content">
To ensure 1 we add one
<com:DocLink ClassPath="System.Web.UI.WebControls.TRequiredFieldValidator" Text="TRequiredFieldValidator" />. To ensure 2 and 3, we add one
<com:DocLink ClassPath="System.Web.UI.WebControls.TCompareValidator" Text="TCompareValidator" />. We may add these validators any where within
the "Home.page" template. Further details regarding these validator and other
validators can be found in the
- <a href="?page=Controls.Validation">Validation Controls</a> page.
+ <a href="?page=Controls.Validation">Validation Controls</a> page.
</p>
<com:TTextHighlighter Language="prado" CssClass="source block-content" id="code9">
&lt;com:TRequiredFieldValidator
@@ -258,12 +257,12 @@ $this->total->Text = $rate * $dollars;
<ol id="o222" class="block-content">
<li>the user enters a value,</li>
<li>the value is a valid number (not including any currency or dollar signs).</li>
- </ol>
+ </ol>
<p id="777" class="block-content">
To ensure 1 we just add another <tt>TRequiredFieldValidator</tt>, for 2
we could use a
<com:DocLink ClassPath="System.Web.UI.WebControls.TDataTypeValidator" Text="TDataTypeValidator" />. For simplicity we only allow the user to enter
- a number for the amount they wish to convert.
+ a number for the amount they wish to convert.
</p>
<com:TTextHighlighter Language="prado" CssClass="source block-content" id="code9a">
&lt;com:TRequiredFieldValidator
@@ -283,7 +282,7 @@ $this->total->Text = $rate * $dollars;
using both javascript and server side. The server side validation
is <b>always performed</b>. For the server side, we
should skip the calculation if the validators are not satisfied. This can
- done as follows.
+ done as follows.
</p>
<com:TTextHighlighter Language="php" CssClass="source block-content" id="code10" >
public function convert_clicked($sender, $param)
@@ -313,7 +312,7 @@ public function convert_clicked($sender, $param)
In addition, we can change the "totals" <tt>TLabel</tt> with the
Active Control counter part,
<com:DocLink ClassPath="System.Web.UI.ActiveControls.TActiveLabel" Text="TActiveLabel" />, such that the server side can update the browser without
- reloading the page.
+ reloading the page.
</p>
<com:TTextHighlighter Language="prado" CssClass="source block-content" id="code11">
<div class="total-field">
@@ -323,11 +322,11 @@ public function convert_clicked($sender, $param)
<div class="convert-button">
&lt;com:TActiveButton Text="Convert" OnClick="convert_clicked" /&gt;
</div>
-</com:TTextHighlighter>
+</com:TTextHighlighter>
<p id="1232" class="block-content">
The server side logic remains the same, we just need to import the
Active Controls name space as they are not included by default. We
- add the following line to the begin of "Home.php".
+ add the following line to the begin of "Home.php".
</p>
<com:TTextHighlighter Language="php" CssClass="source block-content" id="code12">
Prado::using('System.Web.UI.ActiveControls.*');
@@ -345,7 +344,7 @@ Prado::using('System.Web.UI.ActiveControls.*');
<p id="80076" class="block-content">To indicate that the calculation is in progress, we can change the text
of the "total" label as follows. We add a <tt>ClientSide.OnLoading</tt> property
to the "Convert" button (since this button is responsible for requesting
- the calculation).
+ the calculation).
</p>
<com:TTextHighlighter Language="prado" CssClass="source block-content" id="code13">
&lt;com:TActiveButton Text="Convert" OnClick="convert_clicked" &gt;
@@ -383,7 +382,7 @@ Prado::using('System.Web.UI.ActiveControls.*');
<p id="80080" class="block-content">We simply create a CSS file named "common.css" and save it in the
<tt>themes/Basic</tt> directory. Then we add the following code
- to the beginning of "Home.page" (we add a little more HTML as well).
+ to the beginning of "Home.page" (we add a little more HTML as well).
</p>
<com:TTextHighlighter Language="prado" CssClass="source block-content" id="code14">
&lt;%@ Theme="Basic" %&gt;
@@ -392,7 +391,7 @@ Prado::using('System.Web.UI.ActiveControls.*');
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
&lt;com:THead Title="Currency Converter" /&gt;
<body>
-</com:TTextHighlighter>
+</com:TTextHighlighter>
<p id="4334" class="block-content">
The first line <tt>&lt;%@ Theme="Basic" %&gt;</tt> defines the
theme to be used for this page. The
diff --git a/demos/quickstart/protected/pages/Tutorial/fr/AjaxChat.page b/demos/quickstart/protected/pages/Tutorial/fr/AjaxChat.page
index 39d7f9e5..568e920f 100755
--- a/demos/quickstart/protected/pages/Tutorial/fr/AjaxChat.page
+++ b/demos/quickstart/protected/pages/Tutorial/fr/AjaxChat.page
@@ -58,7 +58,6 @@ php prado/framework/prado-cli.php -c chat
class Login extends TPage
{
}
-?&gt;
</com:TTextHighlighter>
<com:TTextHighlighter Language="prado" CssClass="source block-content" id="code_90029">
<!doctype html public "-//W3C//DTD XHTML 1.0 Strict//EN"
diff --git a/demos/quickstart/protected/pages/Tutorial/fr/CurrencyConverter.page b/demos/quickstart/protected/pages/Tutorial/fr/CurrencyConverter.page
index 2cce2336..6b8c7bc3 100755
--- a/demos/quickstart/protected/pages/Tutorial/fr/CurrencyConverter.page
+++ b/demos/quickstart/protected/pages/Tutorial/fr/CurrencyConverter.page
@@ -34,9 +34,9 @@
<tt>currency-converter</tt> in your current working directory.
You may need to change to the appropriate directory
first.
- See the <a href="?page=GettingStarted.CommandLine">Command Line Tool</a>
- for more details.
- </p>
+ See the <a href="?page=GettingStarted.CommandLine">Command Line Tool</a>
+ for more details.
+ </p>
<com:TTextHighlighter Language="text" CssClass="source block-content" id="code111">
php prado/framework/prado-cli.php -c currency-converter
</com:TTextHighlighter>
@@ -52,7 +52,7 @@ php prado/framework/prado-cli.php -c currency-converter
<p id="80058" class="block-content">We start by editing the <tt>Home.page</tt> file found in the
<tt>currency-converter/protected/pages/</tt> directory. Files ending
with ".page" are page templates that contains HTML and Prado controls.
- We simply add two textboxes, three labels and one button as follows.
+ We simply add two textboxes, three labels and one button as follows.
</p>
<com:TTextHighlighter Language="prado" CssClass="source block-content" id="form1">
&lt;com:TForm&gt;
@@ -75,7 +75,7 @@ php prado/framework/prado-cli.php -c currency-converter
</div>
</fieldset>
&lt;/com:TForm&gt;
-</com:TTextHighlighter>
+</com:TTextHighlighter>
<p id="refresh" class="block-content">
If you refresh the page, you should see something similar to the following figure.
It may not look very pretty or orderly, but we shall change that later using CSS.
@@ -125,7 +125,7 @@ php prado/framework/prado-cli.php -c currency-converter
to add a "Home.php" to where "Home.page" is. The <tt>Home</tt> class
should extends the
<com:DocLink ClassPath="System.Web.UI.TPage" Text="TPage" />, the default base
- class for all Prado pages.
+ class for all Prado pages.
</p>
<com:TTextHighlighter Language="php" CssClass="source block-content" id="code3">
&lt;?php
@@ -133,8 +133,7 @@ class Home extends TPage
{
}
-?&gt;
-</com:TTextHighlighter>
+</com:TTextHighlighter>
<p id="1111" class="block-content">
Prado uses PHP's <tt>__autoload</tt> method to load classes. The convention
is to use the class name with ".php" extension as filename.
@@ -151,15 +150,15 @@ class Home extends TPage
the converted total. To handle the user clicking of the "Convert" button
we simply add an <tt>OnClick</tt> property to the "Convert" button in
the "Home.page" template and add a corresponding event handler method
- in the "Home.php".
+ in the "Home.php".
</p>
<com:TTextHighlighter Language="prado" CssClass="source block-content" id="code4">
&lt;com:TButton Text="Convert" OnClick="convert_clicked" /&gt;
</com:TTextHighlighter>
- <p id="222" class="block-content">
+ <p id="222" class="block-content">
The value of the <tt>OnClick</tt>, "<tt>convert_clicked</tt>", will be the method
name in the "Home.php" that will called when the user clicks on the
- "Convert" button.
+ "Convert" button.
</p>
<com:TTextHighlighter Language="php" CssClass="source block-content" id="code5">
class Home extends TPage
@@ -171,8 +170,8 @@ class Home extends TPage
$this->total->Text = $rate * $dollars;
}
}
-</com:TTextHighlighter>
-<div id="3332" class="block-content">
+</com:TTextHighlighter>
+<div id="3332" class="block-content">
<p id="333">
If you run the application in your web browser, enter some values and click
the "Convert" button then you should see that calculated value displayed next
@@ -186,24 +185,24 @@ class Home extends TPage
</p>
<p id="80067">We shall now examine, the three lines that implements the simply currency
- conversion in the "<tt>convert_clicked</tt>" method.
- </p>
+ conversion in the "<tt>convert_clicked</tt>" method.
+ </p>
</div>
<com:TTextHighlighter Language="php" CssClass="source block-content" id="code6" >
$rate = floatval($this->currencyRate->Text);
-</com:TTextHighlighter>
+</com:TTextHighlighter>
<p id="444" class="block-content">
The statement <tt>$this->currencyRate</tt> corresponds to the
<tt>TTextBox</tt> component with <tt>ID</tt> value "currencyRate" in the
"Home.page" template. The <tt>Text</tt> property of the <tt>TTextBox</tt>
contains the value that the user entered. So, we obtain this
value by <tt>$this->currencyRate->Text</tt> which we convert the
- value to a float value.
+ value to a float value.
</p>
<com:TTextHighlighter Language="php" CssClass="source block-content" id="code7">
$dollars = floatval($this->dollars->Text);
-</com:TTextHighlighter>
-<div id="5551" class="block-content">
+</com:TTextHighlighter>
+<div id="5551" class="block-content">
<p id="555">
The next line does a similar things, it takes the user value from
the <tt>TTextBox</tt> with <tt>ID</tt> value "dollars and converts it to
@@ -212,9 +211,9 @@ $dollars = floatval($this->dollars->Text);
<p id="80068">The third line calculates the new amount and set this value in the
<tt>Text</tt> property of the <tt>TLabel</tt> with <tt>ID="total"</tt>.
- Thus, we display the new amount to the user in the label.
+ Thus, we display the new amount to the user in the label.
</p>
-</div>
+</div>
<com:TTextHighlighter Language="php" CssClass="source block-content" id="code8">
$this->total->Text = $rate * $dollars;
</com:TTextHighlighter>
@@ -233,14 +232,14 @@ $this->total->Text = $rate * $dollars;
<li>the user enters a value,</li>
<li>the currency rate is a valid number,</li>
<li>the currency rate is positive.</li>
- </ol>
+ </ol>
<p id="666" class="block-content">
To ensure 1 we add one
<com:DocLink ClassPath="System.Web.UI.WebControls.TRequiredFieldValidator" Text="TRequiredFieldValidator" />. To ensure 2 and 3, we add one
<com:DocLink ClassPath="System.Web.UI.WebControls.TCompareValidator" Text="TCompareValidator" />. We may add these validators any where within
the "Home.page" template. Further details regarding these validator and other
validators can be found in the
- <a href="?page=Controls.Validation">Validation Controls</a> page.
+ <a href="?page=Controls.Validation">Validation Controls</a> page.
</p>
<com:TTextHighlighter Language="prado" CssClass="source block-content" id="code9">
&lt;com:TRequiredFieldValidator
@@ -258,12 +257,12 @@ $this->total->Text = $rate * $dollars;
<ol id="o222" class="block-content">
<li>the user enters a value,</li>
<li>the value is a valid number (not including any currency or dollar signs).</li>
- </ol>
+ </ol>
<p id="777" class="block-content">
To ensure 1 we just add another <tt>TRequiredFieldValidator</tt>, for 2
we could use a
<com:DocLink ClassPath="System.Web.UI.WebControls.TDataTypeValidator" Text="TDataTypeValidator" />. For simplicity we only allow the user to enter
- a number for the amount they wish to convert.
+ a number for the amount they wish to convert.
</p>
<com:TTextHighlighter Language="prado" CssClass="source block-content" id="code9a">
&lt;com:TRequiredFieldValidator
@@ -283,7 +282,7 @@ $this->total->Text = $rate * $dollars;
using both javascript and server side. The server side validation
is <b>always performed</b>. For the server side, we
should skip the calculation if the validators are not satisfied. This can
- done as follows.
+ done as follows.
</p>
<com:TTextHighlighter Language="php" CssClass="source block-content" id="code10" >
public function convert_clicked($sender, $param)
@@ -310,7 +309,7 @@ public function convert_clicked($sender, $param)
In addition, we can change the "totals" <tt>TLabel</tt> with the
Active Control counter part,
<com:DocLink ClassPath="System.Web.UI.ActiveControls.TActiveLabel" Text="TActiveLabel" />, such that the server side can update the browser without
- reloading the page.
+ reloading the page.
</p>
<com:TTextHighlighter Language="prado" CssClass="source block-content" id="code11">
<div class="total-field">
@@ -320,11 +319,11 @@ public function convert_clicked($sender, $param)
<div class="convert-button">
&lt;com:TActiveButton Text="Convert" OnClick="convert_clicked" /&gt;
</div>
-</com:TTextHighlighter>
+</com:TTextHighlighter>
<p id="1232" class="block-content">
The server side logic remains the same, we just need to import the
Active Controls name space as they are not included by default. We
- add the following line to the begin of "Home.php".
+ add the following line to the begin of "Home.php".
</p>
<com:TTextHighlighter Language="php" CssClass="source block-content" id="code12">
Prado::using('System.Web.UI.ActiveControls.*');
@@ -342,7 +341,7 @@ Prado::using('System.Web.UI.ActiveControls.*');
<p id="80076" class="block-content">To indicate that the calculation is in progress, we can change the text
of the "total" label as follows. We add a <tt>ClientSide.OnLoading</tt> property
to the "Convert" button (since this button is responsible for requesting
- the calculation).
+ the calculation).
</p>
<com:TTextHighlighter Language="prado" CssClass="source block-content" id="code13">
&lt;com:TActiveButton Text="Convert" OnClick="convert_clicked" &gt;
@@ -380,7 +379,7 @@ Prado::using('System.Web.UI.ActiveControls.*');
<p id="80080" class="block-content">We simply create a CSS file named "common.css" and save it in the
<tt>themes/Basic</tt> directory. Then we add the following code
- to the beginning of "Home.page" (we add a little more HTML as well).
+ to the beginning of "Home.page" (we add a little more HTML as well).
</p>
<com:TTextHighlighter Language="prado" CssClass="source block-content" id="code14">
&lt;%@ Theme="Basic" %&gt;
@@ -389,7 +388,7 @@ Prado::using('System.Web.UI.ActiveControls.*');
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
&lt;com:THead Title="Currency Converter" /&gt;
<body>
-</com:TTextHighlighter>
+</com:TTextHighlighter>
<p id="4334" class="block-content">
The first line <tt>&lt;%@ Theme="Basic" %&gt;</tt> defines the
theme to be used for this page. The
diff --git a/demos/quickstart/protected/pages/Tutorial/id/AjaxChat.page b/demos/quickstart/protected/pages/Tutorial/id/AjaxChat.page
index 00222bca..50759868 100755
--- a/demos/quickstart/protected/pages/Tutorial/id/AjaxChat.page
+++ b/demos/quickstart/protected/pages/Tutorial/id/AjaxChat.page
@@ -55,7 +55,6 @@ php prado/framework/prado-cli.php -c chat
class Login extends TPage
{
}
-?&gt;
</com:TTextHighlighter>
<com:TTextHighlighter Language="prado" CssClass="source block-content" id="code_90029">
<!doctype html public "-//W3C//DTD XHTML 1.0 Strict//EN"
diff --git a/demos/quickstart/protected/pages/Tutorial/id/CurrencyConverter.page b/demos/quickstart/protected/pages/Tutorial/id/CurrencyConverter.page
index d8f8e2b4..c1eae035 100755
--- a/demos/quickstart/protected/pages/Tutorial/id/CurrencyConverter.page
+++ b/demos/quickstart/protected/pages/Tutorial/id/CurrencyConverter.page
@@ -1,8 +1,8 @@
<com:TContent ID="body">
<h1 id="16001">Membangun Pengubah Kurs Sederhana</h1>
<p id="80053" class="block-content">Tutorial ini memperkenalkan kerangka kerja aplikasi web Prado dan mengajarkan Anda bagaimana untuk
- membangun aplikasi web sederhana dalam beberapa langkah sederhana. Tutorial
- ini menganggap bahwa Anda terbiasa dengan PHP dan Anda telah mengakses
+ membangun aplikasi web sederhana dalam beberapa langkah sederhana. Tutorial
+ ini menganggap bahwa Anda terbiasa dengan PHP dan Anda telah mengakses
server web yang dapat melayani naskah PHP5.
</p>
@@ -25,9 +25,9 @@
<p id="80056" class="block-content">Cara tercepat dan termudah untuk membuat aplikasi web Prado baru adalah menggunakan piranti perintah <tt>prado-cli.php</tt> yang ditemukan dalam direktori <tt>framework</tt>
pada distribusi Prado. Kita membuat aplikasi baru dengan menjalankan perintah berikut dalam prompt perintah atau konsol Anda. Perintah membuat direktori baru bernama <tt>currency-converter</tt> dalam direktori kerja Anda saat ini.
Anda perlu mengubahnya ke direktori yang benar terlebih dahulu.
- Lihat <a href="?page=GettingStarted.CommandLine">Piranti Baris Perintah</a>
- untuk lebih jelasnya.
- </p>
+ Lihat <a href="?page=GettingStarted.CommandLine">Piranti Baris Perintah</a>
+ untuk lebih jelasnya.
+ </p>
<com:TTextHighlighter Language="text" CssClass="source block-content" id="code111">
php prado/framework/prado-cli.php -c currency-converter
</com:TTextHighlighter>
@@ -39,7 +39,7 @@ php prado/framework/prado-cli.php -c currency-converter
<h1 id="16003">Membuat Antarmuka Pengguna Pengubah Kurs</h1>
<p id="80058" class="block-content">Kita mulai dengan mengedit file <tt>Home.page</tt> yang ditemukan dalam direktori <tt>currency-converter/protected/pages/</tt>. File yang berakhiran dengan ".page" adalah template halaman yang berisi HTML dan kontrol Prado.
- Kita cukup menambah dua kotak teks, tiga label dan satu tombol seperti berikut.
+ Kita cukup menambah dua kotak teks, tiga label dan satu tombol seperti berikut.
</p>
<com:TTextHighlighter Language="prado" CssClass="source block-content" id="form1">
&lt;com:TForm&gt;
@@ -62,7 +62,7 @@ php prado/framework/prado-cli.php -c currency-converter
</div>
</fieldset>
&lt;/com:TForm&gt;
-</com:TTextHighlighter>
+</com:TTextHighlighter>
<p id="refresh" class="block-content">
Jika Anda menyegarkan halaman, Anda akan melihat sesuatu mirip dengan gambar berikut.
Ia mungkin terlihat tidak cukup bagus atau berurut, tapi kita akan mengubahnya nanti dengan menggunakan CSS.
@@ -82,7 +82,7 @@ php prado/framework/prado-cli.php -c currency-converter
<com:DocLink ClassPath="System.Web.UI.WebControls.TTextBox" Text="TTextBox" />
yang pada dasarnya mendefinisikan sebuah label dan kotak teks bagi pengguna aplikasi
untuk memasukan nilai pertukaran kurs.
- Nilai properti <tt>ForControl</tt> property menentukan komponen mana label
+ Nilai properti <tt>ForControl</tt> property menentukan komponen mana label
diperuntukan. Ini membolehkan pengguna aplikasi mengklik pada label
untuk memfokuskan pada field (hal yang baik). Anda mungkin telah menggunakan elemen
biasa HTML <tt>&lt;label&gt;</tt> untuk melakukan hal yang sama, tapi
@@ -109,7 +109,7 @@ php prado/framework/prado-cli.php -c currency-converter
<p id="80063" class="block-content">Jika Anda mencoba mengklik pada tombol "Convert" kemudian halaman akan menyegarkan
dan tidak melakukan apapun. Agar tombol melakukan beberapa pekerjaan, kita perlu
menambahkan "Home.php" ke di mana "Home.page" berada. Kelas <tt>Home</tt> harus
- memperluas <com:DocLink ClassPath="System.Web.UI.TPage" Text="TPage" />, basis kelas standar untuk semua halaman Prado.
+ memperluas <com:DocLink ClassPath="System.Web.UI.TPage" Text="TPage" />, basis kelas standar untuk semua halaman Prado.
</p>
<com:TTextHighlighter Language="php" CssClass="source block-content" id="code3">
&lt;?php
@@ -117,8 +117,7 @@ class Home extends TPage
{
}
-?&gt;
-</com:TTextHighlighter>
+</com:TTextHighlighter>
<p id="1111" class="block-content">
Prado menggunakan metode PHP <tt>__autoload</tt> untuk mengambil kelas. Konvensi
adalah untuk menggunakan nama kelas dengan ekstensi ".php" sebagai nama file.
@@ -134,14 +133,14 @@ class Home extends TPage
nilai dalam kotak teks, melakukan beberapa perhitungan dan menyajikan kepada pengguna dengan
total nilai yang dikonversi. Untuk menangani pengguna mengklik pada tombo "Convert",
kita cukup menambahkan sebuah properti <tt>OnClick</tt> ke tombol "Convert" dalam
- template "Home.page" dan menambahkan metode pengendali event terkait dalam "Home.php".
+ template "Home.page" dan menambahkan metode pengendali event terkait dalam "Home.php".
</p>
<com:TTextHighlighter Language="prado" CssClass="source block-content" id="code4">
&lt;com:TButton Text="Convert" OnClick="convert_clicked" /&gt;
</com:TTextHighlighter>
- <p id="222" class="block-content">
+ <p id="222" class="block-content">
Nilai dari <tt>OnClick</tt>, "<tt>convert_clicked</tt>", akan menjadi nama metode
- dalam "Home.php" yang akan dipanggil saat pengguna mengklik tombol "Convert".
+ dalam "Home.php" yang akan dipanggil saat pengguna mengklik tombol "Convert".
</p>
<com:TTextHighlighter Language="php" CssClass="source block-content" id="code5">
class Home extends TPage
@@ -153,8 +152,8 @@ class Home extends TPage
$this->total->Text = $rate * $dollars;
}
}
-</com:TTextHighlighter>
-<div id="3332" class="block-content">
+</com:TTextHighlighter>
+<div id="3332" class="block-content">
<p id="333">
Jika Anda menjalankan aplikasi dalam web browser Anda, masukkan beberapa nilai
dan klik tombol "Convert" kemudian Anda akan melihat nilai yang dihitung ditampilkan
@@ -168,24 +167,24 @@ class Home extends TPage
</p>
<p id="80067">Sekarang kita akan memeriksa, tiga baris yang mengimplementasikan konversi
- kurs sederhana dalam metode "<tt>convert_clicked</tt>".
- </p>
+ kurs sederhana dalam metode "<tt>convert_clicked</tt>".
+ </p>
</div>
<com:TTextHighlighter Language="php" CssClass="source block-content" id="code6" >
$rate = floatval($this->currencyRate->Text);
-</com:TTextHighlighter>
+</com:TTextHighlighter>
<p id="444" class="block-content">
Pernyataan <tt>$this->currencyRate</tt> berhubungan dengan komponen
<tt>TTextBox</tt> dengan nilai <tt>ID</tt> "currencyRate" dalam template
"Home.page". Properti <tt>Text</tt> dari <tt>TTextBox</tt> berisi
nilai yang dimasukan oleh pengguna. Maka kita memperoleh nilai ini dengan
<tt>$this->currencyRate->Text</tt> yang kita konversi nilainya ke nilai
- pecahan.
+ pecahan.
</p>
<com:TTextHighlighter Language="php" CssClass="source block-content" id="code7">
$dollars = floatval($this->dollars->Text);
-</com:TTextHighlighter>
-<div id="5551" class="block-content">
+</com:TTextHighlighter>
+<div id="5551" class="block-content">
<p id="555">
Baris berikutnya melakukan hal yang mirip, ia mengambil nilai pengguna
dari <tt>TTextBox</tt> dengan nilai <tt>ID</tt> "dollars dang mengubahnya
@@ -194,9 +193,9 @@ $dollars = floatval($this->dollars->Text);
<p id="80068">Baris ketiga menghitung jumlah baru dan menyetel nilai ini dalam properti
<tt>Text</tt> dari <tt>TLabel</tt> dengan <tt>ID="total"</tt>.
- Selanjutnya, kita tampilkan jumlah baru ke pengguna dalam label.
+ Selanjutnya, kita tampilkan jumlah baru ke pengguna dalam label.
</p>
-</div>
+</div>
<com:TTextHighlighter Language="php" CssClass="source block-content" id="code8">
$this->total->Text = $rate * $dollars;
</com:TTextHighlighter>
@@ -210,11 +209,11 @@ $this->total->Text = $rate * $dollars;
<li>pengguna memasukan sebuah nilai,</li>
<li>kurs mata uang adalah angka yang benar,</li>
<li>kurs mata uang adalah positif.</li>
- </ol>
+ </ol>
<p id="666" class="block-content">
Untuk memastikan poin 1 kita menambahkan satu
<com:DocLink ClassPath="System.Web.UI.WebControls.TRequiredFieldValidator" Text="TRequiredFieldValidator" />. Untuk memastikan poin 2 dan 3, kita menambahkan satu <com:DocLink ClassPath="System.Web.UI.WebControls.TCompareValidator" Text="TCompareValidator" />. Kita dapat menambahkan validator ini di mana saja di dalam template "Home.page". Perincian selanjutnya mengenai validator ini dan validator lainnya dapat ditemukan dalam halaman
- <a href="?page=Controls.Validation">Validation Controls</a>.
+ <a href="?page=Controls.Validation">Validation Controls</a>.
</p>
<com:TTextHighlighter Language="prado" CssClass="source block-content" id="code9">
&lt;com:TRequiredFieldValidator
@@ -232,11 +231,11 @@ $this->total->Text = $rate * $dollars;
<ol id="o222" class="block-content">
<li>pengguna memasukan sebuah nilai,</li>
<li>nilai adalah angka yang benar (tidak menyertakan tanda kurs atau dolar).</li>
- </ol>
+ </ol>
<p id="777" class="block-content">
Untuk memastikan 1 kita cukup menambahkan <tt>TRequiredFieldValidator</tt> lainnya, untuk 2
kita dapat menggunakan
- <com:DocLink ClassPath="System.Web.UI.WebControls.TDataTypeValidator" Text="TDataTypeValidator" />. Untuk memudahkan kita hanya membolehkan pengguna untuk memasukan sebuah angka untuk jumlah yang ingin mereka ubah.
+ <com:DocLink ClassPath="System.Web.UI.WebControls.TDataTypeValidator" Text="TDataTypeValidator" />. Untuk memudahkan kita hanya membolehkan pengguna untuk memasukan sebuah angka untuk jumlah yang ingin mereka ubah.
</p>
<com:TTextHighlighter Language="prado" CssClass="source block-content" id="code9a">
&lt;com:TRequiredFieldValidator
@@ -249,8 +248,8 @@ $this->total->Text = $rate * $dollars;
</com:TTextHighlighter>
</p>
- <p id="80072" class="block-content">Sekarang jika Anda mencoba memasukan beberapa data tidak benar dalam aplikasi atau membiarkan field kosong
- validators akan diaktifkan dan menyajikan pesan kesalahan kepada pengguna. Catatan bahwa pesan kesalahan disajikan tanpa mengambil ulang halaman. Validator Prado standarnya memvalidasi javascript dan di dalam server. Validasi di dalam server <b>selalu dilakukan</b>. Untuk sisi server, kita harus melewati perhitungan jika validator tidak memuaskan. Ini dapat dilakukan seperti berikut.
+ <p id="80072" class="block-content">Sekarang jika Anda mencoba memasukan beberapa data tidak benar dalam aplikasi atau membiarkan field kosong
+ validators akan diaktifkan dan menyajikan pesan kesalahan kepada pengguna. Catatan bahwa pesan kesalahan disajikan tanpa mengambil ulang halaman. Validator Prado standarnya memvalidasi javascript dan di dalam server. Validasi di dalam server <b>selalu dilakukan</b>. Untuk sisi server, kita harus melewati perhitungan jika validator tidak memuaskan. Ini dapat dilakukan seperti berikut.
</p>
<com:TTextHighlighter Language="php" CssClass="source block-content" id="code10" >
public function convert_clicked($sender, $param)
@@ -276,7 +275,7 @@ memperbaiki pengalaman pengguna dengan meningkatkan tanggapan aplikasi. Satu car
<com:DocLink ClassPath="System.Web.UI.ActiveControls.TActiveButton" Text="TActiveButton" />,
yang dapat memicu event klik di dalam server tanpa mengambil ulang halaman.
Sebagai tambahan, kita dapat mengubah "total" <tt>TLabel</tt> dengan pasangan Kontrol Aktif,
- <com:DocLink ClassPath="System.Web.UI.ActiveControls.TActiveLabel" Text="TActiveLabel" />, dengan demikian di dalam server dapat memutakhirkan browser tanpa mengambil ulang halaman.
+ <com:DocLink ClassPath="System.Web.UI.ActiveControls.TActiveLabel" Text="TActiveLabel" />, dengan demikian di dalam server dapat memutakhirkan browser tanpa mengambil ulang halaman.
</p>
<com:TTextHighlighter Language="prado" CssClass="source block-content" id="code11">
<div class="total-field">
@@ -286,10 +285,10 @@ memperbaiki pengalaman pengguna dengan meningkatkan tanggapan aplikasi. Satu car
<div class="convert-button">
&lt;com:TActiveButton Text="Convert" OnClick="convert_clicked" /&gt;
</div>
-</com:TTextHighlighter>
+</com:TTextHighlighter>
<p id="1232" class="block-content">
Logika di dalam server tetap sama, kita hanya perlu mengimpor
- ruang nama Kontrol Aktif karena secara standar tidak disertakan. Kita menambahkan baris berikut ke awal "Home.php".
+ ruang nama Kontrol Aktif karena secara standar tidak disertakan. Kita menambahkan baris berikut ke awal "Home.php".
</p>
<com:TTextHighlighter Language="php" CssClass="source block-content" id="code12">
Prado::using('System.Web.UI.ActiveControls.*');
@@ -300,7 +299,7 @@ Prado::using('System.Web.UI.ActiveControls.*');
Selanjutnya kita bisa memperbaiki pengalaman pengguna dengan mengunah label teks "total" menjadi "calculating..." saat pengguna mengklik tombol "Convert". Label teks "total" masih dimutakhirkan dengan jumlah perhitungan baru seperti sebelumnya.
</p>
- <p id="80076" class="block-content">Untuk mengindikasikan bahwa perhitungan sedang berlangsung, kita dapat mengubah label teks "total" sebagai berikut. Kita menambahkan properti <tt>ClientSide.OnLoading</tt> ke tombol "Convert" (karena tombol ini bertanggung jawab terhadap permintaan perhitungan).
+ <p id="80076" class="block-content">Untuk mengindikasikan bahwa perhitungan sedang berlangsung, kita dapat mengubah label teks "total" sebagai berikut. Kita menambahkan properti <tt>ClientSide.OnLoading</tt> ke tombol "Convert" (karena tombol ini bertanggung jawab terhadap permintaan perhitungan).
</p>
<com:TTextHighlighter Language="prado" CssClass="source block-content" id="code13">
&lt;com:TActiveButton Text="Convert" OnClick="convert_clicked" &gt;
@@ -325,7 +324,7 @@ Prado::using('System.Web.UI.ActiveControls.*');
</p>
<p id="80080" class="block-content">Kita cukup dengan membuat file CSS bernama "common.css" dan menyimpannya dalam direktori
- <tt>themes/Basic</tt>. Kemudian kita menambahkan kode berikut ke awal "Home.page" (kita menambahkan sedikit kode HTML juga).
+ <tt>themes/Basic</tt>. Kemudian kita menambahkan kode berikut ke awal "Home.page" (kita menambahkan sedikit kode HTML juga).
</p>
<com:TTextHighlighter Language="prado" CssClass="source block-content" id="code14">
&lt;%@ Theme="Basic" %&gt;
@@ -334,10 +333,10 @@ Prado::using('System.Web.UI.ActiveControls.*');
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
&lt;com:THead Title="Currency Converter" /&gt;
<body>
-</com:TTextHighlighter>
+</com:TTextHighlighter>
<p id="4334" class="block-content">
Baris pertama <tt>&lt;%@ Theme="Basic" %&gt;</tt> mendefinisikan tema
- yang dipakai untuk halaman ini.
+ yang dipakai untuk halaman ini.
<com:DocLink ClassPath="System.Web.UI.WebControls.THead" Text="THead" />
merujuk ke elemen HTML <tt>&lt;head&gt;</tt>. Sebagai tambahan terhadap
tampilan properti <tt>Title</tt> pada <tt>THead</tt>, semua file CSS
diff --git a/demos/sqlmap/protected/pages/Manual/Tutorial/TestFirst.page b/demos/sqlmap/protected/pages/Manual/Tutorial/TestFirst.page
index 80a155cb..55d55c31 100755
--- a/demos/sqlmap/protected/pages/Manual/Tutorial/TestFirst.page
+++ b/demos/sqlmap/protected/pages/Manual/Tutorial/TestFirst.page
@@ -46,7 +46,6 @@ class PersonTest extends UnitTestCase
$this->assertNotNull($person, "Person not returned");
}
}
-?&gt;
</com:TTextHighlighter>
<p>Well, the example sure looks easy enough! We ask a method to "select all", and
@@ -54,7 +53,7 @@ it returns a list of person objects. But, what code do we need to write to
pass this test?</p>
<div class="note"><b class="tip">Note:</b>
- Save the <tt>PersonTest.php</tt> into a <tt>tests</tt> directory.
+ Save the <tt>PersonTest.php</tt> into a <tt>tests</tt> directory.
The unit tests are written for the <a href="http://simpletest.sf.net">SimpleTest Unit Testing framework</a>.
</div>
@@ -74,7 +73,6 @@ error_reporting(E_ALL);
$test = new GroupTest('All tests');
$test->addTestFile('Tests/PersonTest.php'); $test->run(new HtmlReporter());
-?&gt;
</com:TTextHighlighter>
<p>To run the tests, point your browser to the "<tt>run_test.php</tt>" script file
@@ -108,7 +106,6 @@ class Person
$this->_birthDate = $value;
}
}
-?&gt;
</com:TTextHighlighter>
<p>OK, that was fun! The <tt>$this->assertXXX(...)</tt> methods are built into
@@ -125,7 +122,7 @@ method executes our SQL statement (or stored procedure) and returns the result
as a list. Each row in the result becomes an entry in the list. Along with
<tt>queryForList()</tt>, there are also <tt>delete()</tt>, <tt>insert()</tt>,
<tt>queryForObject()</tt>, <tt>queryForPagedList()</tt> and a few other methods in the
-<a href="?page=Manual.DataMapperAPI">SQLMap API</a>.
+<a href="?page=Manual.DataMapperAPI">SQLMap API</a>.
<p>Looking at unit test example, we see that the <tt>queryForList()</tt> method
takes the name of the statement we want to run. OK. Easy enough. But where
diff --git a/demos/sqlmap/protected/pages/Manual/Tutorial/TestSecond.page b/demos/sqlmap/protected/pages/Manual/Tutorial/TestSecond.page
index 706b5220..b128c413 100755
--- a/demos/sqlmap/protected/pages/Manual/Tutorial/TestSecond.page
+++ b/demos/sqlmap/protected/pages/Manual/Tutorial/TestSecond.page
@@ -58,7 +58,6 @@ error_reporting(E_ALL);
require_once('/path/to/prado/framework/prado.php');
$application=new TApplication;
$application->run();
-?>
</com:TTextHighlighter>
<p>Now we are ready to setup a page to display our list of people.
@@ -106,7 +105,6 @@ class Home extends TPage
$this->loadData();
}
}
-?&gt;
</com:TTextHighlighter>
<p>If we run this now, we'll get a list like the one shown the figure below.</p>