本文整理汇总了PHP中JUri::ROOT方法的典型用法代码示例。如果您正苦于以下问题:PHP JUri::ROOT方法的具体用法?PHP JUri::ROOT怎么用?PHP JUri::ROOT使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JUri
的用法示例。
在下文中一共展示了JUri::ROOT方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: SendMailToAdminApproval
function SendMailToAdminApproval($prod_values, $item_id, $newProduct = 1)
{
$loguser = JFactory::getUser();
$comquick2cartHelper = new comquick2cartHelper();
$app = JFactory::getApplication();
$mailfrom = $app->getCfg('mailfrom');
$fromname = $app->getCfg('fromname');
$sitename = $app->getCfg('sitename');
$params = JComponentHelper::getParams('com_quick2cart');
$sendto = $params->get('sale_mail');
$currency = $comquick2cartHelper->getCurrencySession();
//$params->get('addcurrency'); // @sheha : currency should take from session instead of param
//$sendto = $mailfrom;
$multiple_img = array();
$count = 0;
$prod_imgs = $prod_values->get('qtc_prodImg', array(), "ARRAY");
$quick2cartModelProduct = new quick2cartModelProduct();
$multiple_img = $quick2cartModelProduct->getProdutImages($item_id);
$body = '';
// Edit product
if ($newProduct == 0) {
$subject = JText::_('COM_Q2C_EDIT_PRODUCT_SUBJECT');
$subject = str_replace('{sellername}', $loguser->name, $subject);
$body = JText::_('COM_Q2C_EDIT_PRODUCT_BODY');
$body = str_replace('{productname}', $prod_values->get('item_name', '', 'RAW'), $body);
$pod_price = $prod_values->get('multi_cur', array(), "ARRAY");
$body = str_replace('{price}', $pod_price[$currency], $body);
$body = str_replace('{sellername}', $loguser->name, $body);
$body = str_replace('{sku}', $prod_values->get('sku', '', 'RAW'), $body);
//~ for($i=0; $i < count($multiple_img); $i++)
//~ {
//~ print"<pre>"; print_r($multiple_img); die("222882");
//~ $body .= '<br><img src="' . JUri::root() . 'images/quick2cart/' . $multiple_img[$i] . '" alt="No image" ><br>';
//~ }
if (!empty($multiple_img)) {
$multiple_img = (array) $multiple_img;
foreach ($multiple_img as $key => $img) {
$body .= '<br><img src="' . JUri::root() . 'images/quick2cart/' . $img[$key] . '" alt="No image" ><br>';
}
}
} else {
$subject = JText::_('COM_Q2C_PRODUCT_AAPROVAL_SUBJECT');
$body = JText::_('COM_Q2C_PRODUCT_AAPROVAL_BODY');
$body = str_replace('{title}', $prod_values->get('item_name', '', 'RAW'), $body);
$body = str_replace('{sellername}', $loguser->name, $body);
$desc = $prod_values->get('description', '', 'ARRAY');
$desc = strip_tags(trim($desc['data']));
$body = str_replace('{des}', $desc, $body);
$body = str_replace('{link}', JUri::base() . 'administrator/index.php?option=com_quick2cart&view=products&filter_published=0', $body);
for ($i = 0; $i < count($multiple_img); $i++) {
$body .= '<br><img src="' . JUri::ROOT() . 'images/quick2cart/' . $multiple_img[$i] . '" alt="No image" ><br>';
}
}
$res = $comquick2cartHelper->sendmail($mailfrom, $subject, $body, $sendto);
}