当前位置: 首页>>代码示例>>PHP>>正文


PHP Tienda::getVersion方法代码示例

本文整理汇总了PHP中Tienda::getVersion方法的典型用法代码示例。如果您正苦于以下问题:PHP Tienda::getVersion方法的具体用法?PHP Tienda::getVersion怎么用?PHP Tienda::getVersion使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Tienda的用法示例。


在下文中一共展示了Tienda::getVersion方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: sendBug

 /**
  * Submits a bug report to Dioscouri.
  * Thanks so much!  They really help improve the product!
  */
 function sendBug()
 {
     $mainframe = JFactory::getApplication();
     $body = JRequest::getVar('body');
     $name = JRequest::getVar('title');
     $body .= "\n\n Project: tienda";
     $body .= "\n Tracker: Bug";
     $body .= "\n Affected Version: " . Tienda::getVersion();
     $doc = JDocument::getInstance('raw');
     ob_start();
     $option = JRequest::getCmd('option');
     $db = JFactory::getDBO();
     $path = JPATH_ADMINISTRATOR . '/components/com_admin/';
     require_once $path . 'admin.admin.html.php';
     $path .= 'tmpl/';
     require_once $path . 'sysinfo_system.php';
     require_once $path . 'sysinfo_directory.php';
     require_once $path . 'sysinfo_phpinfo.php';
     require_once $path . 'sysinfo_phpsettings.php';
     require_once $path . 'sysinfo_config.php';
     jimport('joomla.filesystem.file');
     $contents = ob_get_contents();
     ob_end_clean();
     $doc->setBuffer($contents);
     $contents = $doc->render();
     $sitename = $config->get('sitename', $mainframe->getCfg('sitename'));
     // write file with info
     $config = JFactory::getConfig();
     $filename = 'system_info_' . $sitename . '.html';
     $file = JPATH_SITE . '/tmp/' . $filename;
     JFile::write($file, $contents);
     $mailer = JFactory::getMailer();
     $success = false;
     // For now, bug submission goes to info@dioscouri.com,
     // but in the future, it will go to projects@dioscouri.com
     // (once we get the Redmine auto-create working properly
     // and format the subject/body of the email properly)
     $mailer->addRecipient('projects@dioscouri.com');
     $mailer->setSubject($name);
     $mailfrom = $config->get('emails_defaultemail', $mainframe->getCfg('mailfrom'));
     $fromname = $config->get('emails_defaultname', $mainframe->getCfg('fromname'));
     // check user mail format type, default html
     $mailer->setBody($body);
     $mailer->addAttachment($file);
     $sender = array($mailfrom, $fromname);
     $mailer->setSender($sender);
     $sent = $mailer->send();
     if ($sent == '1') {
         $success = true;
     }
     JFile::delete($file);
     if ($success) {
         $msg = JText::_('COM_TIENDA_BUG_SUBMIT_OK');
         $msgtype = 'message';
     } else {
         $msg = JText::_('COM_TIENDA_BUG_SUBMIT_FAIL');
         $msgtype = 'notice';
     }
     $mainframe->redirect(JRoute::_('index.php?option=com_tienda&view=dashboard'), $msg, $msgtype);
 }
开发者ID:annggeel,项目名称:tienda,代码行数:64,代码来源:bug_report.php


注:本文中的Tienda::getVersion方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。