<?php } ?> <tr><td><?php echo C_LANG145; ?> :</td><td> <?php if (isset($_REQUEST['edit'])) { ?> <select name="profileAge"> <?php echo getUserAge($age); ?> </select> <?php } else { ?> <?php echo $age; ?> <?php } ?> </td></tr> <tr><td><?php echo C_LANG119;
public function getSaveAge() { $this->setRquery("SELECT pDOBD,pDOBM,pDOBY FROM amistiPersonal WHERE userID=?", array($this->UID)); $res = $this->getRquery(); $id = $this->UID; $age = getUserAge($res[0]['pDOBD'], $res[0]['pDOBM'], $res[0]['pDOBY']); $age .= " years"; $birthD .= addZero($res[0]['pDOBD']) . " " . numberToMonth($res[0]['pDODM']); $ageInfo = $this->UID == UID ? "Your age information:" : $this->uName . " age information:"; ?> <div class="pProfileICHeader"> <?php echo $ageInfo; ?> </div> <?php if ($this->UID == UID) { //check if it same as cur user ?> <div class="pProfileMenuShow">...</div> <!--- menu --> <div class="pProfileMenu"> <li id="ageEdit">Edit</li> <li id="ageDelete">Delete</li> </div> <?php } ?> <div class="pProfileItem"> <table> <tr><td>Date of Birth </td><td>: <?php echo $birthD; ?> </td></tr> <tr><td> Age </td><td>: <?php echo $age; ?> </td></tr> </table> </div> <?php }
/** * Event listener method handles all Frontend actions * * @param Enlight_Event_EventArgs $args */ static function onPostRatepayDispatch(Enlight_Event_EventArgs $args) { $config = Shopware()->Plugins()->Frontend()->PigmbhRatePAYPayment()->Config(); Shopware()->Template()->addTemplateDir(dirname(__FILE__) . '/Views/Frontend/'); /** @var $request Enlight_Controller_Request_RequestHttp */ $request = $args->getSubject()->Request(); // just be active in the frontend and while the plugin is enabled if ($request->getModuleName() == 'frontend' && $config->multishopactive == true) { $view = $args->getSubject()->View(); Shopware()->Session()->pi_ratepay_rate_calc_path = Shopware()->Config()->get('basepath') . '/engine/Shopware/Plugins/Default/Frontend/PigmbhRatePAYPayment/Ratenrechner/'; // return if no template could be found. if(!$view->hasTemplate()) { return; } $userData = $view->sUserData; if(isset($userData['billingadress']['id'])) { Shopware()->Session()->RatepayCustomerId=$userData['billingadress']['id']; } $ratepayPayment=checkRatepayPayment($userData); if ($userData && $ratepayPayment) { checkBillingEqualShipping($userData, $view); checkB2BAllowed($userData, $view); if(Shopware()->Session()->ratepayB2BInvoice && $userData["additional"]["payment"]["name"] == "RatePAYInvoice" || Shopware()->Session()->ratepayB2BRate && $userData["additional"]["payment"]["name"] == "RatePAYRate" || Shopware()->Session()->ratepayB2BDebit && $userData["additional"]["payment"]["name"] == "RatePAYDebit" || Shopware()->Session()->ratePAYadressDiff) { $sql = "UPDATE `s_user` SET `paymentID` = ? WHERE `id` = ?"; Shopware()->Db()->query($sql, array( (int)Shopware()->Config()->Paymentdefault, (int)$userData['billingaddress']['userID'] )); } } $view->extendsTemplate('index/header.tpl'); //Checks if customer can pay with RatePAY, sets error messages and loads payment_fieldset template //Also implements fix for older templates and sets debit data // sViewport has been removed - instead $args->getSubject()->Request()->getControllerName() can be used if ($request->getControllerName() == 'account' || $request->getControllerName() == 'checkout' || $request->getControllerName() == 'register') { $basket = Shopware()->Session()->sOrderVariables['sBasket']; //gets userage and checks user data if ($userData) { $userAge = getUserAge($userData, $view); checkBillingEqualShipping($userData, $view); checkUserData($userData, $view, $userAge); checkB2BAllowed($userData, $view); $view->debitData = getEncodedDebitData($userData['billingaddress']['userID']); if(!isset($view->debitData)) $view->debitData = getDebitData(); } //displays surcharge at payment selection if($basket){ setSurcharge($basket, $view); Shopware()->Session()->pi_ratepay_Warenkorbbetrag = number_format($basket['AmountNumeric'], 2, ".", ""); } $view->activateDebit = $config->activate_debit; $view->extendsTemplate('register/payment_fieldset.tpl'); //Saves data entered in RatePAY form if ($request->getActionName() == 'savePayment') { $post = $args->getSubject()->Request()->getPost(); setDirectDebitSession($post); if (isset($post['saveRatepayInvoiceData']) || isset($post['saveRatepayRateData']) || isset($post['saveRatepayDebitData'])){ saveUserData($args); } elseif($post['register']['payment'] == getDebitPaymentId() || ($post['register']['payment']== getRatePaymentId() && Shopware()->Session()->RatepayDirectDebit)){ if(!checkDebitData($post)){ header('Location:'.str_replace("savePayment","payment",Shopware()->Config()->Host.$_SERVER['REQUEST_URI'])); //break; } else{ Shopware()->Session()->RatepayRateMissingBankData = false; Shopware()->Session()->RatepayDebitMissingBankData = false; saveDebitData($args); } } } //template fix and saving of direct debit selection for ratepay installment if($request->getActionName() == 'payment'){ if(Shopware()->Session()->RatepayDebitMissingBankData){ $view->RatepayDebitMissingBankData = true; } elseif(Shopware()->Session()->RatepayRateMissingBankData){ $view->RatepayRateMissingBankData = true; } } //Sets debit data if(Shopware()->Session()->RatepayDirectDebit){ $view->ratepayDebitPayType = Shopware()->Session()->RatepayDirectDebit; } //Extends checkout with RatePAY AGB, rate calculator and payment notices and also sets template vars if ($request->getControllerName() == 'checkout' && $request->getActionName() != 'finish' && $request->getActionName() != 'cart' && $request->sTargetAction != 'cart' && isset($ratepayPayment)) { $view->extendsTemplate('checkout/confirm.tpl'); setTemplateVars($view, $request, $config, $userData); } //Confirms RatePAY order at finish page if ($request->getControllerName() == 'checkout' && $request->getActionName() == 'finish' && $request->getActionName() != 'cart' && $ratepayPayment && !Shopware()->Session()->pi_ratepay_Confirm){ confirmPayment($config, $userData); } } } }
function getAdminProfiles($findUser) { $tmp = mysql_query("\n\t\tSELECT * \n\t\tFROM prochatrooms_profiles\n\t\tWHERE username = '******'\n\t\t") or die(mysql_error()); $html = ''; $html .= '<tr><td colspan="2"><b>:: Search All Profiles</b></td></tr>'; $html .= '<tr><td colspan="2"><b> </b></td></tr>'; $html .= '<tr><td width="100">Username:</td><td><input type="text" name="findUser" value=""> <input type="submit" name="submit" value="Find!"> (enter full username)</td></tr>'; $html .= '<tr><td colspan="2"><b> </b></td></tr>'; $html .= '</table>'; $html .= '<br>'; $html .= '<table>'; $html .= '<tr class="header"><td colspan="2">:: User Details</td></tr>'; if (!mysql_num_rows($tmp)) { $html .= '<tr><td colspan="2">no results found, search for a username above ...</td></tr>'; } while ($i = mysql_fetch_array($tmp)) { $html .= '<input type="hidden" name="updateUser" value="' . $i['id'] . '">'; $html .= '<tr><td colspan="2"> </td></tr>'; $html .= '<tr><td>Username</td><td>' . urldecode($i['username']) . '</td></tr>'; $html .= '<tr><td>Real Name</td><td><input type="text" name="real_name" value="' . $i['real_name'] . '"></td></tr>'; $html .= '<tr><td>Age</td><td><select name="age">' . getUserAge($i['age']) . '</select></td></tr>'; $html .= '<tr><td>Gender</td><td><select name="gender">' . getUserGenders($i['gender']) . '</select></td></tr>'; $html .= '<tr><td>Photo</td><td><a href="../profiles/view.php?id=' . $i['id'] . '" target="_blank"><img src="../profiles/view.php?id=' . $i['id'] . '" height="100" width="120" border="0"></a></td></tr>'; $html .= '<tr><td> </td><td><input type="checkbox" name="del" value="' . $i['id'] . '"> Delete Image?</td></tr>'; $html .= '<tr><td>Location</td><td><input type="text" name="location" value="' . urldecode($i['location']) . '"></td></tr>'; $html .= '<tr><td>Hobbies</td><td><input type="text" name="hobbies" value="' . urldecode($i['hobbies']) . '"></td></tr>'; $html .= '<tr><td>About Me</td><td><textarea name="aboutme">' . urldecode($i['aboutme']) . '</textarea></td></tr>'; } if (mysql_num_rows($tmp)) { $html .= '<tr><td> </td><td><input type="submit" name="update" value="Update User"><br><br></td></tr>'; } return $html; }