document.write('<div class="php" style="font-family: monospace;"><br />');
document.write('<span style="color: #000000; font-weight: bold;">&lt;?php</span> <br />');
document.write('<br />');
document.write('<span style="color: #000000; font-weight: bold;">class</span> credit<span style="color: #66cc66;">&#123;</span><br />');
document.write('<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">function</span> credit<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">function</span> validate<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$cc_number</span>, <span style="color: #0000ff;">$cvv2</span>, <span style="color: #0000ff;">$date</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">validateCard</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$cc_number</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">validateExDate</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$date</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">validateCVV</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$cc_number</span>, <span style="color: #0000ff;">$cvv2</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">function</span> validateCard<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$cc_number</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.php.net/global"><span style="color: #000066;">global</span></a> <span style="color: #0000ff;">$e</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$first_number</span> = <a target="_blank"&nbsp; href="http://www.php.net/substr"><span style="color: #000066;">substr</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$cc_number</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">switch</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$first_number</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">case</span> <span style="color: #cc66cc;">3</span>:<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>!<a target="_blank"&nbsp; href="http://www.php.net/preg_match"><span style="color: #000066;">preg_match</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">\'/^3<span style="color: #000099; font-weight: bold;">\d</span>{3}[ <span style="color: #000099; font-weight: bold;">\-</span>]?<span style="color: #000099; font-weight: bold;">\d</span>{6}[ <span style="color: #000099; font-weight: bold;">\-</span>]?<span style="color: #000099; font-weight: bold;">\d</span>{5}$/\'</span>, <span style="color: #0000ff;">$cc_number</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #0000ff;">$e</span>-&gt;<span style="color: #006600;">setError</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;American Express number is not valid&quot;</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">break</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">case</span> <span style="color: #cc66cc;">4</span>:<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>!<a target="_blank"&nbsp; href="http://www.php.net/preg_match"><span style="color: #000066;">preg_match</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">\'/^4<span style="color: #000099; font-weight: bold;">\d</span>{3}[ <span style="color: #000099; font-weight: bold;">\-</span>]?<span style="color: #000099; font-weight: bold;">\d</span>{4}[ <span style="color: #000099; font-weight: bold;">\-</span>]?<span style="color: #000099; font-weight: bold;">\d</span>{4}[ <span style="color: #000099; font-weight: bold;">\-</span>]?<span style="color: #000099; font-weight: bold;">\d</span>{4}$/\'</span>, <span style="color: #0000ff;">$cc_number</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #0000ff;">$e</span>-&gt;<span style="color: #006600;">setError</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;Visa number is not valid&quot;</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">break</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">case</span> <span style="color: #cc66cc;">5</span>:<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>!<a target="_blank"&nbsp; href="http://www.php.net/preg_match"><span style="color: #000066;">preg_match</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">\'/^5<span style="color: #000099; font-weight: bold;">\d</span>{3}[ <span style="color: #000099; font-weight: bold;">\-</span>]?<span style="color: #000099; font-weight: bold;">\d</span>{4}[ <span style="color: #000099; font-weight: bold;">\-</span>]?<span style="color: #000099; font-weight: bold;">\d</span>{4}[ <span style="color: #000099; font-weight: bold;">\-</span>]?<span style="color: #000099; font-weight: bold;">\d</span>{4}$/\'</span>, <span style="color: #0000ff;">$cc_number</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #0000ff;">$e</span>-&gt;<span style="color: #006600;">setError</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;MasterCard number is not valid&quot;</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">break</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">case</span> <span style="color: #cc66cc;">6</span>:<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>!<a target="_blank"&nbsp; href="http://www.php.net/preg_match"><span style="color: #000066;">preg_match</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">\'/^6011[ <span style="color: #000099; font-weight: bold;">\-</span>]?<span style="color: #000099; font-weight: bold;">\d</span>{4}[ <span style="color: #000099; font-weight: bold;">\-</span>]?<span style="color: #000099; font-weight: bold;">\d</span>{4}[ <span style="color: #000099; font-weight: bold;">\-</span>]?<span style="color: #000099; font-weight: bold;">\d</span>{4}$/\'</span>, <span style="color: #0000ff;">$cc_number</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #0000ff;">$e</span>-&gt;<span style="color: #006600;">setError</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;Discover Card number is not valid&quot;</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">break</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">default</span>:<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span style="color: #0000ff;">$e</span>-&gt;<span style="color: #006600;">setError</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;Credit Card number is not valid: Error 1&quot;</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span style="color: #b1b100;">break</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$e</span>-&gt;<span style="color: #006600;">countErrors</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> == <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span> <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">validateCard2</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$cc_number</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">function</span> validateCard2<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$cc_number</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.php.net/global"><span style="color: #000066;">global</span></a> <span style="color: #0000ff;">$e</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$checksum</span> = <span style="color: #cc66cc;">0</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$j</span> = <span style="color: #cc66cc;">1</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">for</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$i</span> = <a target="_blank"&nbsp; href="http://www.php.net/strlen"><span style="color: #000066;">strlen</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$cc_number</span><span style="color: #66cc66;">&#41;</span> - <span style="color: #cc66cc;">1</span>; <span style="color: #0000ff;">$i</span> &gt;= <span style="color: #cc66cc;">0</span>; <span style="color: #0000ff;">$i</span>--<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$calc</span> = <a target="_blank"&nbsp; href="http://www.php.net/substr"><span style="color: #000066;">substr</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$cc_number</span>, <span style="color: #0000ff;">$i</span>, <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span> * <span style="color: #0000ff;">$j</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$calc</span> &gt; <span style="color: #cc66cc;">9</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$checksum</span> = <span style="color: #0000ff;">$checksum</span> + <span style="color: #cc66cc;">1</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$calc</span>&nbsp; &nbsp; &nbsp;= <span style="color: #0000ff;">$calc</span> - <span style="color: #cc66cc;">10</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$checksum</span> += <span style="color: #0000ff;">$calc</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$j</span> == <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$j</span> = <span style="color: #cc66cc;">2</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><span style="color: #b1b100;">else</span><span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$j</span> = <span style="color: #cc66cc;">1</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$checksum</span> % <span style="color: #cc66cc;">10</span> != <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span> <span style="color: #0000ff;">$e</span>-&gt;<span style="color: #006600;">setError</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;Credit Card number is not valid: Error 2&quot;</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">function</span> validateExDate<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$date</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.php.net/global"><span style="color: #000066;">global</span></a> <span style="color: #0000ff;">$e</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$month</span> =&nbsp; <a target="_blank"&nbsp; href="http://www.php.net/substr"><span style="color: #000066;">substr</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$date</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #cc66cc;">2</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$year</span> =&nbsp; <a target="_blank"&nbsp; href="http://www.php.net/substr"><span style="color: #000066;">substr</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$date</span>, <span style="color: #cc66cc;">2</span>, <span style="color: #cc66cc;">2</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$current_month</span> = <a target="_blank"&nbsp; href="http://www.php.net/date"><span style="color: #000066;">date</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;m&quot;</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$current_year</span>&nbsp; = <a target="_blank"&nbsp; href="http://www.php.net/date"><span style="color: #000066;">date</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;y&quot;</span><span style="color: #66cc66;">&#41;</span>; <br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$year</span> &lt; <span style="color: #0000ff;">$current_year</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span> <br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$e</span>-&gt;<span style="color: #006600;">setError</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;Expiration Date is not valid : Error 3&quot;</span><span style="color: #66cc66;">&#41;</span>; <br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><span style="color: #b1b100;">else</span><span style="color: #66cc66;">&#123;</span> <br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$year</span> == <span style="color: #0000ff;">$current_year</span><span style="color: #66cc66;">&#41;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$month</span> &lt; <span style="color: #0000ff;">$current_month</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$e</span>-&gt;<span style="color: #006600;">setError</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;Expiration Date is not valid : Error 4&quot;</span><span style="color: #66cc66;">&#41;</span>; <br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">function</span> validateCVV<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$cc_number</span>, <span style="color: #0000ff;">$cvv2</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.php.net/global"><span style="color: #000066;">global</span></a> <span style="color: #0000ff;">$e</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$first_number</span> = <a target="_blank"&nbsp; href="http://www.php.net/substr"><span style="color: #000066;">substr</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$cc_number</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$first_number</span> == <span style="color: #cc66cc;">3</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>!<a target="_blank"&nbsp; href="http://www.php.net/preg_match"><span style="color: #000066;">preg_match</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;/^<span style="color: #000099; font-weight: bold;">\d</span>{4}$/&quot;</span>, <span style="color: #0000ff;">$cvv2</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #0000ff;">$e</span>-&gt;<span style="color: #006600;">setError</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;CVV number is not valid : Error 5&quot;</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><span style="color: #b1b100;">else</span><span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>!<a target="_blank"&nbsp; href="http://www.php.net/preg_match"><span style="color: #000066;">preg_match</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;/^<span style="color: #000099; font-weight: bold;">\d</span>{3}$/&quot;</span>, <span style="color: #0000ff;">$cvv2</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #0000ff;">$e</span>-&gt;<span style="color: #006600;">setError</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;CVV number is not valid : Error 6&quot;</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">function</span> maskCard<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$cc_number</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$count</span> = <a target="_blank"&nbsp; href="http://www.php.net/strlen"><span style="color: #000066;">strlen</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$cc_number</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">for</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$i</span> = <span style="color: #cc66cc;">1</span>; <span style="color: #0000ff;">$i</span> &lt;= <span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$count</span> <span style="color: #cc66cc;">-4</span><span style="color: #66cc66;">&#41;</span>; <span style="color: #0000ff;">$i</span>++<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.php.net/echo"><span style="color: #000066;">echo</span></a> <span style="color: #ff0000;">&quot;X&quot;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.php.net/echo"><span style="color: #000066;">echo</span></a> <a target="_blank"&nbsp; href="http://www.php.net/substr"><span style="color: #000066;">substr</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$cc_number</span>, <span style="color: #cc66cc;">-4</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('<br />');
document.write('<span style="color: #66cc66;">&#125;</span><br />');
document.write('<br />');
document.write('<span style="color: #000000; font-weight: bold;">?&gt;</span><br />');
document.write('&nbsp;</div><div class="php" style="font-family: monospace;"><br />');
document.write('<span style="color: #000000; font-weight: bold;">&lt;?php</span> <br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">require_once</span> <span style="color: #ff0000;">&quot;class.error.php&quot;</span>;<br />');
document.write('&nbsp; &nbsp; <span style="color: #0000ff;">$e</span> = <span style="color: #000000; font-weight: bold;">new</span> error;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">require_once</span> <span style="color: #ff0000;">&quot;class.credit.php&quot;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$cc</span> = <span style="color: #000000; font-weight: bold;">new</span> credit;&nbsp; &nbsp; &nbsp; &nbsp;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$_POST</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$cc_number</span> = <span style="color: #0000ff;">$_POST</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">\'cc_number\'</span><span style="color: #66cc66;">&#93;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$expire_month</span> = <span style="color: #0000ff;">$_POST</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">\'expire_month\'</span><span style="color: #66cc66;">&#93;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$expire_year</span> = <span style="color: #0000ff;">$_POST</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">\'expire_year\'</span><span style="color: #66cc66;">&#93;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$cc_cvv</span> = <span style="color: #0000ff;">$_POST</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">\'cc_cvv\'</span><span style="color: #66cc66;">&#93;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$date</span> = <span style="color: #0000ff;">$expire_month</span> . <span style="color: #0000ff;">$expire_year</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$cc</span>-&gt;<span style="color: #006600;">validate</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$cc_number</span>, <span style="color: #0000ff;">$cc_cvv</span>, <span style="color: #0000ff;">$date</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$e</span>-&gt;<span style="color: #006600;">countErrors</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> == <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//process form</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.php.net/header"><span style="color: #000066;">header</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;location: somewhere.php&quot;</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.php.net/die"><span style="color: #000066;">die</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />');
document.write('<span style="color: #000000; font-weight: bold;">?&gt;</span><br />');
document.write('&nbsp; &nbsp; <br />');
document.write('&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #0000ff;">$e</span>-&gt;<span style="color: #006600;">showErrors</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>; <span style="color: #000000; font-weight: bold;">?&gt;</span><br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &lt;form method=<span style="color: #ff0000;">&quot;post&quot;</span> action=<span style="color: #ff0000;">&quot;&lt;?php echo $_SERVER[\'PHP_SELF\'] ?&gt;&quot;</span>&gt;<br />');
document.write('&nbsp; &nbsp; &lt;table border=<span style="color: #ff0000;">&quot;0&quot;</span> cellpadding=<span style="color: #ff0000;">&quot;4&quot;</span> width=<span style="color: #ff0000;">&quot;450&quot;</span>&gt;<br />');
document.write('&nbsp; &nbsp; &nbsp; &lt;tr&gt;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &lt;td width=<span style="color: #ff0000;">&quot;200&quot;</span> <span style="color: #000000; font-weight: bold;">class</span>=<span style="color: #ff0000;">&quot;tbl_left&quot;</span>&gt;Payment Type: &lt;/td&gt;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &lt;td width=<span style="color: #ff0000;">&quot;250&quot;</span> <span style="color: #000000; font-weight: bold;">class</span>=<span style="color: #ff0000;">&quot;tbl_right&quot;</span>&gt;Credit Card&lt;/td&gt;<br />');
document.write('&nbsp; &nbsp; &nbsp; &lt;/tr&gt;<br />');
document.write('&nbsp; &nbsp; &nbsp; &lt;tr&gt;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &lt;td <span style="color: #000000; font-weight: bold;">class</span>=<span style="color: #ff0000;">&quot;tbl_left&quot;</span>&gt;Card Holder Name: &lt;/td&gt;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &lt;td <span style="color: #000000; font-weight: bold;">class</span>=<span style="color: #ff0000;">&quot;tbl_right&quot;</span>&gt;&lt;input type=<span style="color: #ff0000;">&quot;text&quot;</span> name=<span style="color: #ff0000;">&quot;cc_name&quot;</span> /&gt;&lt;/td&gt;<br />');
document.write('&nbsp; &nbsp; &nbsp; &lt;/tr&gt;<br />');
document.write('&nbsp; &nbsp; &nbsp; &lt;tr&gt;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &lt;td <span style="color: #000000; font-weight: bold;">class</span>=<span style="color: #ff0000;">&quot;tbl_left&quot;</span>&gt;Card Type: &lt;/td&gt;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &lt;td <span style="color: #000000; font-weight: bold;">class</span>=<span style="color: #ff0000;">&quot;tbl_right&quot;</span>&gt;&lt;select name=<span style="color: #ff0000;">&quot;cc_type&quot;</span>&gt;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &lt;option value=<span style="color: #ff0000;">&quot;American Express&quot;</span>&gt;American Express&lt;/option&gt;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &lt;option value=<span style="color: #ff0000;">&quot;Discover&quot;</span>&gt;Discover&lt;/option&gt;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &lt;option value=<span style="color: #ff0000;">&quot;Master Card&quot;</span>&gt;Master Card&lt;/option&gt;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &lt;option value=<span style="color: #ff0000;">&quot;Visa&quot;</span>&gt;Visa&lt;/option&gt;<br />');
document.write('&nbsp; &nbsp; &lt;/select&gt; <br />');
document.write('&nbsp; &nbsp; &lt;/td&gt;<br />');
document.write('&nbsp; &nbsp; &nbsp; &lt;/tr&gt;<br />');
document.write('&nbsp; &nbsp; &nbsp; &lt;tr&gt;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &lt;td <span style="color: #000000; font-weight: bold;">class</span>=<span style="color: #ff0000;">&quot;tbl_left&quot;</span>&gt;Credit Card Number: &lt;/td&gt;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &lt;td <span style="color: #000000; font-weight: bold;">class</span>=<span style="color: #ff0000;">&quot;tbl_right&quot;</span>&gt;&lt;input type=<span style="color: #ff0000;">&quot;text&quot;</span> name=<span style="color: #ff0000;">&quot;cc_number&quot;</span> /&gt;&lt;/td&gt;<br />');
document.write('&nbsp; &nbsp; &nbsp; &lt;/tr&gt;<br />');
document.write('&nbsp; &nbsp; &nbsp; &lt;tr&gt;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &lt;td <span style="color: #000000; font-weight: bold;">class</span>=<span style="color: #ff0000;">&quot;tbl_left&quot;</span>&gt;Expiration <a target="_blank"&nbsp; href="http://www.php.net/date"><span style="color: #000066;">Date</span></a>: &lt;/td&gt;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &lt;td <span style="color: #000000; font-weight: bold;">class</span>=<span style="color: #ff0000;">&quot;tbl_right&quot;</span>&gt;&lt;select name=<span style="color: #ff0000;">&quot;expire_month&quot;</span>&gt;<br />');
document.write('&nbsp; &nbsp; &lt;option value=<span style="color: #ff0000;">&quot;01&quot;</span>&gt;January&lt;/option&gt;<br />');
document.write('&nbsp; &nbsp; &lt;option value=<span style="color: #ff0000;">&quot;02&quot;</span>&gt;February&lt;/option&gt;<br />');
document.write('&nbsp; &nbsp; &lt;option value=<span style="color: #ff0000;">&quot;03&quot;</span>&gt;March&lt;/option&gt;<br />');
document.write('&nbsp; &nbsp; &lt;option value=<span style="color: #ff0000;">&quot;04&quot;</span>&gt;April&lt;/option&gt;<br />');
document.write('&nbsp; &nbsp; &lt;option value=<span style="color: #ff0000;">&quot;05&quot;</span>&gt;May&lt;/option&gt;<br />');
document.write('&nbsp; &nbsp; &lt;option value=<span style="color: #ff0000;">&quot;06&quot;</span>&gt;June&lt;/option&gt;<br />');
document.write('&nbsp; &nbsp; &lt;option value=<span style="color: #ff0000;">&quot;07&quot;</span>&gt;July&lt;/option&gt;<br />');
document.write('&nbsp; &nbsp; &lt;option value=<span style="color: #ff0000;">&quot;08&quot;</span>&gt;August&lt;/option&gt;<br />');
document.write('&nbsp; &nbsp; &lt;option value=<span style="color: #ff0000;">&quot;09&quot;</span>&gt;September&lt;/option&gt;<br />');
document.write('&nbsp; &nbsp; &lt;option value=<span style="color: #ff0000;">&quot;10&quot;</span>&gt;October&lt;/option&gt;<br />');
document.write('&nbsp; &nbsp; &lt;option value=<span style="color: #ff0000;">&quot;11&quot;</span>&gt;November&lt;/option&gt;<br />');
document.write('&nbsp; &nbsp; &lt;option value=<span style="color: #ff0000;">&quot;12&quot;</span>&gt;December&lt;/option&gt;<br />');
document.write('&nbsp; &nbsp; &lt;/select&gt; <br />');
document.write('&nbsp; &nbsp; &lt;select name=<span style="color: #ff0000;">&quot;expire_year&quot;</span>&gt;<br />');
document.write('&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">&lt;?php</span> <br />');
document.write('&nbsp; &nbsp; <span style="color: #b1b100;">for</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$x</span>=<a target="_blank"&nbsp; href="http://www.php.net/date"><span style="color: #000066;">date</span></a><span style="color: #66cc66;">&#40;</span>Y<span style="color: #66cc66;">&#41;</span>; <span style="color: #0000ff;">$x</span>&lt;=<span style="color: #cc66cc;">2050</span>; <span style="color: #0000ff;">$x</span>++<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span><br />');
document.write('&nbsp; &nbsp; <a target="_blank"&nbsp; href="http://www.php.net/echo"><span style="color: #000066;">echo</span></a> <span style="color: #ff0000;">\'&lt;option value=&quot;\'</span>.<a target="_blank"&nbsp; href="http://www.php.net/substr"><span style="color: #000066;">substr</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$x</span>, <span style="color: #cc66cc;">-2</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #ff0000;">\'&quot;&gt;\'</span>.<span style="color: #0000ff;">$x</span>.<span style="color: #ff0000;">\'&lt;/option&gt;\'</span>.<span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>;<br />');
document.write('&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />');
document.write('&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">?&gt;</span><br />');
document.write('&nbsp; &nbsp; &lt;/select&gt;<br />');
document.write('&nbsp; &nbsp; &lt;/td&gt;<br />');
document.write('&nbsp; &nbsp; &nbsp; &lt;/tr&gt;<br />');
document.write('&nbsp; &nbsp; &nbsp; &lt;tr&gt;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &lt;td <span style="color: #000000; font-weight: bold;">class</span>=<span style="color: #ff0000;">&quot;tbl_left&quot;</span>&gt;CVV Number:&lt;/td&gt;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &lt;td <span style="color: #000000; font-weight: bold;">class</span>=<span style="color: #ff0000;">&quot;tbl_right&quot;</span>&gt;&lt;input type=<span style="color: #ff0000;">&quot;text&quot;</span> name=<span style="color: #ff0000;">&quot;cc_cvv&quot;</span> size=<span style="color: #ff0000;">&quot;5&quot;</span> maxlength=<span style="color: #ff0000;">&quot;4&quot;</span> /&gt;&lt;/td&gt;<br />');
document.write('&nbsp; &nbsp; &nbsp; &lt;/tr&gt;&nbsp; <br />');
document.write('&nbsp; &nbsp; &nbsp; &lt;tr&gt;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &lt;td <span style="color: #000000; font-weight: bold;">class</span>=<span style="color: #ff0000;">&quot;tbl_left&quot;</span>&gt;Enter a Promo Code: &lt;/td&gt;<br />');
document.write('&nbsp; &nbsp; &nbsp; &nbsp; &lt;td <span style="color: #000000; font-weight: bold;">class</span>=<span style="color: #ff0000;">&quot;tbl_right&quot;</span>&gt;&lt;input type=<span style="color: #ff0000;">&quot;text&quot;</span> name=<span style="color: #ff0000;">&quot;promo_code&quot;</span> /&gt;&lt;/td&gt;<br />');
document.write('&nbsp; &nbsp; &nbsp; &lt;/tr&gt;<br />');
document.write('&nbsp; &nbsp; &lt;/table&gt;<br />');
document.write('&lt;/form&gt;<br />');
document.write('&nbsp;</div><div class="php" style="font-family: monospace;"><br />');
document.write('<a target="_blank"&nbsp; href="http://www.php.net/echo"><span style="color: #000066;">echo</span></a> <span style="color: #0000ff;">$cc</span>-&gt;<span style="color: #006600;">maskCard</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$cc_number</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('&nbsp;</div>');
document.write('<br />&nbsp;<br /><div style="font-size: 12px">Brought to you by the community at <a href="http://www.bytemycode.com/snippets/snippet/712/1/" target="_blank">byteMyCode</a>.</div>');
