<?php /** * Magento * * NOTICE OF LICENSE * * This source file is subject to the Academic Free License (AFL 3.0) * that is bundled with this package in the file LICENSE_AFL.txt. * It is also available through the world-wide-web at this URL: * http://o...content-available-to-author-only...e.org/licenses/afl-3.0.php * If you did not receive a copy of the license and are unable to * obtain it through the world-wide-web, please send an email * to license@magentocommerce.com so we can send you a copy immediately. * * DISCLAIMER * * Do not edit or add to this file if you wish to upgrade Magento to newer * versions in the future. If you wish to customize Magento for your * needs please refer to http://w...content-available-to-author-only...e.com for more information. * * @category design * @package base_default * @copyright Copyright (c) 2013 Magento Inc. (http://w...content-available-to-author-only...e.com) * @license http://o...content-available-to-author-only...e.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> <div class="form-add"> <h2><?php echo $this->__('Write Your Own Review') ?></h2> <?php if ($this->getAllowWriteReviewFlag()): ?> <form action="<?php echo $this->getAction() ?>" method="post" id="review-form"> <fieldset> <?php echo $this->getChildHtml('form_fields_before')?> <?php if (Mage::getSingleton('customer/session')->isLoggedIn()) { /* Get the customer data */ $customer = Mage::getSingleton('customer/session')->getCustomer(); /* Get the customer's full name */ $fullname = $customer->getName(); /* Get the customer's first name */ $firstname = $customer->getFirstname(); /* Get the customer's location */ //$location = $customer->getLocation(); /* Get the customer's last name */ $lastname = $customer->getLastname(); /* Get the customer's email address */ $email = $customer->getSummary(); }?> <?php if( $this->getRatings() && $this->getRatings()->getSize()): ?> <span id="input-message-box"></span> <table class="data-table" id="product-review-table"> <tbody> <?php $count = 0; ?> <?php foreach ($this->getRatings() as $_rating): ?> <?php if($count == 0): ?> <tr> <th>Overall rating</th> <?php foreach ($_rating->getOptions() as $_option): ?> <td class="value"><input type="radio" name="ratings[<?php echo $_rating->getId() ?>]" id="<?php echo $this->escapeHtml($_rating->getRatingCode()) ?>_<?php echo $_option->getValue() ?>" value="<?php echo $_option->getId() ?>" class="radio" /></td> <?php endforeach; ?> </tr> <?php else: ?> <tr style="display: none;"> <th><?php echo $this->escapeHtml($_rating->getRatingCode()) ?></th> <?php foreach ($_rating->getOptions() as $_option): ?> <td class="value"><input type="radio" name="ratings[<?php echo $_rating->getId() ?>]" id="<?php echo $this->escapeHtml($_rating->getRatingCode()) ?>_<?php echo $_option->getValue() ?>" value="<?php echo $_option->getId() ?>" class="radio" /></td> <?php endforeach; ?> </tr> <?php endif; ?> <?php $count++; ?> <?php endforeach; ?> </tbody> </table> <div class="rating-alert-msg"></div> <input type="hidden" name="validate_rating" class="validate-rating" value="" /> <script type="text/javascript">decorateTable('product-review-table')</script> <?php endif; ?> <ul class="form-list"> <li> <label for="nickname_field" class="required"><em>*</em><?php echo $this->__('Nickname') ?></label> <div class="input-box"> <input type="text" name="nickname" id="nickname_field" class="input-text required-entry" value="<?php if($firstname){ echo $firstname; }else{echo $this->escapeHtml($data->getNickname());} ?>" /> </div> </li> <li> <label for="summary_field" class="required"><em>*</em><?php echo $this->__('Email address') ?></label> <div class="input-box"> <input type="text" name="title" id="summary_field" class="input-text required-entry" value="<?php if($email){echo $email;}else{echo $this->escapeHtml($data->getTitle());} ?>" /> </div> </li> <!--<li> <label for="location_field" class="required"><em>*</em><?php echo $this->__('Location') ?></label> <div class="input-box"> <input type="text" name="title" id="location_field" class="input-text required-entry" value="<?php //if($location){echo $location;}else{echo $this->escapeHtml($data->getLocation());} ?>" /> </div> </li>--> <li> <label for="review_field" class="required"><em>*</em><?php echo $this->__('Review') ?></label> <div class="input-box"> <textarea name="detail" id="review_field" cols="5" rows="3" class="required-entry"><?php echo $this->escapeHtml($data->getDetail()) ?></textarea> </div> </li> </ul> </fieldset> <div class="buttons-set"> <button type="submit" title="<?php echo $this->__('Submit Review') ?>" class="button"><span><span><?php echo $this->__('Submit Review') ?></span></span></button> </div> </form> <script> //<![CDATA[ var radio = $$('.radio'); for(var l = 0; l < radio.length; l++){ } function checkRadio(e){ if(e && e.currentTarget.checked){ document.getElementsByClassName('rating-alert-msg')[0].innerHTML = ""; var table = $('product-review-table'); var tr = table.select('tr'); var td = tr[0].getElementsByTagName('td'); var count = 0; for(var i = 0; i < td.length; i++){ var input = td[i].getElementsByTagName('input')[0]; console.log(input.checked); if(input.checked){ count = i; console.log(count); } } for(var j = 1; j < tr.length; j++){ console.log(tr[j]); var oTd = tr[j].getElementsByTagName('td'); var input = oTd[count].getElementsByTagName('input')[0]; console.log(input); input.checked = true; } } } //]]> </script> <script type="text/javascript"> //<![CDATA[ var dataForm = new VarienForm('review-form'); Validation.addAllThese( [ ['validate-rating', '<?php echo $this->__('Please select one of each of the ratings above') ?>', function(v) { var table = $('product-review-table'); var tr = table.select('tr'); var td = tr[0].getElementsByTagName('td'); var validateRating = false; for(var i = 0; i < td.length; i++){ var input = td[i].getElementsByTagName('input')[0]; if(input.checked){ validateRating = true; } } if(!validateRating){ document.getElementsByClassName('rating-alert-msg')[0].innerHTML = "Please provide rating above"; } var trs = $('product-review-table').select('tr'); var inputs; var error = 1; for( var j=0; j < trs.length; j++ ) { var tr = trs[j]; if( j > 0 ) { inputs = tr.select('input'); for( i in inputs ) { if( inputs[i].checked == true ) { error = 0; } } if( error == 1 ) { return false; } else { error = 1; } } } return true; }] ] ); //]]> </script> <?php else: ?> <p class="review-nologged" id="review-form"> <?php echo $this->__('Only registered users can write reviews. Please, <a href="%s">log in</a> or <a href="%s">register</a>', $this->getLoginLink(), Mage::helper('customer')->getRegisterUrl()) ?> </p> <?php endif ?> </div>
Standard input is empty
Main.java:1: error: class, interface, or enum expected
<?php
^
Main.java:27: error: <identifier> expected
<div class="form-add">
^
Main.java:27: error: illegal start of type
<div class="form-add">
^
Main.java:27: error: <identifier> expected
<div class="form-add">
^
Main.java:27: error: ';' expected
<div class="form-add">
^
Main.java:28: error: <identifier> expected
<h2><?php echo $this->__('Write Your Own Review') ?></h2>
^
Main.java:28: error: <identifier> expected
<h2><?php echo $this->__('Write Your Own Review') ?></h2>
^
Main.java:28: error: '(' expected
<h2><?php echo $this->__('Write Your Own Review') ?></h2>
^
Main.java:28: error: <identifier> expected
<h2><?php echo $this->__('Write Your Own Review') ?></h2>
^
Main.java:28: error: illegal start of type
<h2><?php echo $this->__('Write Your Own Review') ?></h2>
^
Main.java:28: error: unclosed character literal
<h2><?php echo $this->__('Write Your Own Review') ?></h2>
^
Main.java:28: error: ')' expected
<h2><?php echo $this->__('Write Your Own Review') ?></h2>
^
Main.java:28: error: unclosed character literal
<h2><?php echo $this->__('Write Your Own Review') ?></h2>
^
Main.java:28: error: illegal start of type
<h2><?php echo $this->__('Write Your Own Review') ?></h2>
^
Main.java:28: error: ';' expected
<h2><?php echo $this->__('Write Your Own Review') ?></h2>
^
Main.java:28: error: illegal start of type
<h2><?php echo $this->__('Write Your Own Review') ?></h2>
^
Main.java:28: error: ';' expected
<h2><?php echo $this->__('Write Your Own Review') ?></h2>
^
Main.java:29: error: <identifier> expected
<?php if ($this->getAllowWriteReviewFlag()): ?>
^
Main.java:29: error: <identifier> expected
<?php if ($this->getAllowWriteReviewFlag()): ?>
^
Main.java:29: error: '(' expected
<?php if ($this->getAllowWriteReviewFlag()): ?>
^
Main.java:29: error: illegal start of type
<?php if ($this->getAllowWriteReviewFlag()): ?>
^
Main.java:29: error: ';' expected
<?php if ($this->getAllowWriteReviewFlag()): ?>
^
Main.java:29: error: invalid method declaration; return type required
<?php if ($this->getAllowWriteReviewFlag()): ?>
^
Main.java:29: error: ';' expected
<?php if ($this->getAllowWriteReviewFlag()): ?>
^
Main.java:30: error: > expected
<form action="<?php echo $this->getAction() ?>" method="post" id="review-form">
^
Main.java:30: error: <identifier> expected
<form action="<?php echo $this->getAction() ?>" method="post" id="review-form">
^
Main.java:30: error: illegal start of type
<form action="<?php echo $this->getAction() ?>" method="post" id="review-form">
^
Main.java:30: error: ';' expected
<form action="<?php echo $this->getAction() ?>" method="post" id="review-form">
^
Main.java:30: error: <identifier> expected
<form action="<?php echo $this->getAction() ?>" method="post" id="review-form">
^
Main.java:32: error: illegal start of expression
<?php echo $this->getChildHtml('form_fields_before')?>
^
Main.java:32: error: illegal start of expression
<?php echo $this->getChildHtml('form_fields_before')?>
^
Main.java:32: error: : expected
<?php echo $this->getChildHtml('form_fields_before')?>
^
Main.java:32: error: ';' expected
<?php echo $this->getChildHtml('form_fields_before')?>
^
Main.java:32: error: <identifier> expected
<?php echo $this->getChildHtml('form_fields_before')?>
^
Main.java:32: error: illegal start of type
<?php echo $this->getChildHtml('form_fields_before')?>
^
Main.java:32: error: unclosed character literal
<?php echo $this->getChildHtml('form_fields_before')?>
^
Main.java:32: error: unclosed character literal
<?php echo $this->getChildHtml('form_fields_before')?>
^
Main.java:32: error: illegal start of type
<?php echo $this->getChildHtml('form_fields_before')?>
^
Main.java:32: error: ')' expected
<?php echo $this->getChildHtml('form_fields_before')?>
^
Main.java:33: error: ';' expected
<?php if (Mage::getSingleton('customer/session')->isLoggedIn()) {
^
Main.java:33: error: <identifier> expected
<?php if (Mage::getSingleton('customer/session')->isLoggedIn()) {
^
Main.java:33: error: illegal start of type
<?php if (Mage::getSingleton('customer/session')->isLoggedIn()) {
^
Main.java:33: error: ';' expected
<?php if (Mage::getSingleton('customer/session')->isLoggedIn()) {
^
Main.java:33: error: invalid method declaration; return type required
<?php if (Mage::getSingleton('customer/session')->isLoggedIn()) {
^
Main.java:33: error: unclosed character literal
<?php if (Mage::getSingleton('customer/session')->isLoggedIn()) {
^
Main.java:33: error: illegal start of type
<?php if (Mage::getSingleton('customer/session')->isLoggedIn()) {
^
Main.java:33: error: ')' expected
<?php if (Mage::getSingleton('customer/session')->isLoggedIn()) {
^
Main.java:33: error: unclosed character literal
<?php if (Mage::getSingleton('customer/session')->isLoggedIn()) {
^
Main.java:33: error: illegal start of type
<?php if (Mage::getSingleton('customer/session')->isLoggedIn()) {
^
Main.java:33: error: <identifier> expected
<?php if (Mage::getSingleton('customer/session')->isLoggedIn()) {
^
Main.java:33: error: ';' expected
<?php if (Mage::getSingleton('customer/session')->isLoggedIn()) {
^
Main.java:33: error: illegal start of type
<?php if (Mage::getSingleton('customer/session')->isLoggedIn()) {
^
Main.java:33: error: <identifier> expected
<?php if (Mage::getSingleton('customer/session')->isLoggedIn()) {
^
Main.java:33: error: ';' expected
<?php if (Mage::getSingleton('customer/session')->isLoggedIn()) {
^
Main.java:35: error: ';' expected
$customer = Mage::getSingleton('customer/session')->getCustomer();
^
Main.java:35: error: unclosed character literal
$customer = Mage::getSingleton('customer/session')->getCustomer();
^
Main.java:35: error: ';' expected
$customer = Mage::getSingleton('customer/session')->getCustomer();
^
Main.java:35: error: illegal start of expression
$customer = Mage::getSingleton('customer/session')->getCustomer();
^
Main.java:35: error: unclosed character literal
$customer = Mage::getSingleton('customer/session')->getCustomer();
^
Main.java:37: error: illegal start of expression
$fullname = $customer->getName();
^
Main.java:39: error: illegal start of expression
$firstname = $customer->getFirstname();
^
Main.java:43: error: illegal start of expression
$lastname = $customer->getLastname();
^
Main.java:45: error: illegal start of expression
$email = $customer->getSummary();
^
Main.java:47: error: illegal start of type
}?>
^
Main.java:47: error: ';' expected
}?>
^
Main.java:48: error: <identifier> expected
<?php if( $this->getRatings() && $this->getRatings()->getSize()): ?>
^
Main.java:48: error: <identifier> expected
<?php if( $this->getRatings() && $this->getRatings()->getSize()): ?>
^
Main.java:48: error: '(' expected
<?php if( $this->getRatings() && $this->getRatings()->getSize()): ?>
^
Main.java:48: error: illegal start of type
<?php if( $this->getRatings() && $this->getRatings()->getSize()): ?>
^
Main.java:48: error: ';' expected
<?php if( $this->getRatings() && $this->getRatings()->getSize()): ?>
^
Main.java:48: error: invalid method declaration; return type required
<?php if( $this->getRatings() && $this->getRatings()->getSize()): ?>
^
Main.java:48: error: ';' expected
<?php if( $this->getRatings() && $this->getRatings()->getSize()): ?>
^
Main.java:49: error: > expected
<span id="input-message-box"></span>
^
Main.java:49: error: <identifier> expected
<span id="input-message-box"></span>
^
Main.java:49: error: illegal start of type
<span id="input-message-box"></span>
^
Main.java:49: error: <identifier> expected
<span id="input-message-box"></span>
^
Main.java:49: error: ';' expected
<span id="input-message-box"></span>
^
Main.java:49: error: illegal start of type
<span id="input-message-box"></span>
^
Main.java:49: error: ';' expected
<span id="input-message-box"></span>
^
Main.java:50: error: > expected
<table class="data-table" id="product-review-table">
^
Main.java:50: error: illegal start of type
<table class="data-table" id="product-review-table">
^
Main.java:50: error: <identifier> expected
<table class="data-table" id="product-review-table">
^
Main.java:50: error: '(' expected
<table class="data-table" id="product-review-table">
^
Main.java:50: error: <identifier> expected
<table class="data-table" id="product-review-table">
^
Main.java:52: error: illegal start of expression
<?php $count = 0; ?>
^
Main.java:52: error: illegal start of expression
<?php $count = 0; ?>
^
Main.java:52: error: : expected
<?php $count = 0; ?>
^
Main.java:52: error: illegal start of type
<?php $count = 0; ?>
^
Main.java:52: error: ';' expected
<?php $count = 0; ?>
^
Main.java:53: error: <identifier> expected
<?php foreach ($this->getRatings() as $_rating): ?>
^
Main.java:53: error: <identifier> expected
<?php foreach ($this->getRatings() as $_rating): ?>
^
Main.java:53: error: ';' expected
<?php foreach ($this->getRatings() as $_rating): ?>
^
Main.java:53: error: invalid method declaration; return type required
<?php foreach ($this->getRatings() as $_rating): ?>
^
Main.java:53: error: ';' expected
<?php foreach ($this->getRatings() as $_rating): ?>
^
Main.java:54: error: <identifier> expected
<?php if($count == 0): ?>
^
Main.java:54: error: <identifier> expected
<?php if($count == 0): ?>
^
Main.java:54: error: '(' expected
<?php if($count == 0): ?>
^
Main.java:54: error: illegal start of type
<?php if($count == 0): ?>
^
Main.java:54: error: ';' expected
<?php if($count == 0): ?>
^
Main.java:56: error: illegal start of type
<th>Overall rating</th>
^
100 errors
Standard output is empty