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


PHP externalUrl函数代码示例

本文整理汇总了PHP中externalUrl函数的典型用法代码示例。如果您正苦于以下问题:PHP externalUrl函数的具体用法?PHP externalUrl怎么用?PHP externalUrl使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: renderItem

 /**
  * Render single feed item
  *
  * @param Angie_Feed_Item $item
  * @return string
  */
 private function renderItem(Angie_Feed_Item $item)
 {
     $result = "<item>\n";
     $result .= '<title>' . clean($item->getTitle()) . "</title>\n";
     $link = externalUrl(clean($item->getLink()));
     $result .= '<link>' . $link . "</link>\n";
     //$result .= '<guid>' . $link . "</guid>\n";
     if ($description = trim($item->getDescription())) {
         $description = "empty";
     }
     // if
     $result .= '<description>' . clean($description) . "</description>\n";
     $author = $item->getAuthor();
     if ($author instanceof Angie_Feed_Author) {
         $result .= '<author>' . clean($author->getEmail()) . ' (' . clean($author->getName()) . ")</author>\n";
     }
     // if
     $timestamp = NULL;
     $pubdate = $item->getPublicationDate();
     if ($pubdate instanceof DateTimeValue) {
         $result .= '<pubDate>' . $pubdate->toRSS() . "</pubDate>\n";
         $timestamp = $pubdate->getTimestamp();
     }
     // if
     $result .= '<guid>' . $this->buildGuid(clean($item->getLink()), $timestamp) . "</guid>\n";
     $result .= '</item>';
     return $result;
 }
开发者ID:federosky,项目名称:ProjectPier-Core,代码行数:34,代码来源:Angie_Feed_Renderer_RSS2.class.php

示例2: wiki_replace_link_callback

/**
 * Replaces wiki links in format [wiki:{PAGE_ID}] with a textile link to the page
 * 
 * @param mixed $content
 * @return
 */
function wiki_replace_link_callback($matches)
{
    //print_r($matches);
    if (count($matches) >= 2) {
        if (is_numeric($matches[1])) {
            $object_id = $matches[1];
            $object = Wiki::instance()->findById($object_id);
            if ($object instanceof WikiPage) {
                if ($matches[2] == ',content') {
                    $revision = $object->getLatestRevision();
                    return do_textile(plugin_manager()->apply_filters('wiki_text', $revision->getContent()));
                }
                return '<a href="' . externalUrl($object->getViewUrl()) . '" title="' . lang('wiki page') . "({$object_id})" . '">' . $object->getObjectName() . '</a>';
            }
        }
    }
    return '<del>' . lang('invalid reference', $matches[0]) . '</del>';
}
开发者ID:bklein01,项目名称:Project-Pier,代码行数:24,代码来源:wiki.php

示例3: audioPlayer

  if ((evt.keyCode == 13) && (node.type=="text"))  {return false;} 
}

function audioPlayer(url) { 
  window.open(url, 'audio_player', 'width=200,height=240,scrollbars=no,toolbar=no,location=no,menubar=no');
}

$(function() {
  $( "#memo>.content" ).resizable({ 
     handles: 'se',
     alsoResize: '#memotext',
     stop: function(event, ui) { 
       $( "#memo>.header" ).width(ui.size.width);
       viewdata = '' + ui.size.width + ',' + ui.size.height;
       post('<?php 
echo externalUrl(get_url('user', 'saveprojectnoteview', null, null, true, '&'));
?>
', viewdata );
     }
  });
});

function autosaveFormInputs(prefix) {
  $(':input').each(function(index){
      // event handler to catch onblur events
      // it sets the cookie values each time you move out of an input field
      this.onblur = function() {
        var name = this.name;
        var value = this.value;
        $.cookie( prefix + name, value);
        //alert('setCookie: '+name + ' = '+value);
开发者ID:bklein01,项目名称:Project-Pier,代码行数:31,代码来源:inlinejs.php

示例4: getTestEmail

 /**
  * Sets up a new Gdn_Email object with a test email.
  *
  * @param string $image The img src of the previewed image
  * @param string $textColor The hex color code of the text.
  * @param string $backGroundColor The hex color code of the background color.
  * @param string $containerBackgroundColor The hex color code of the container background color.
  * @param string $buttonTextColor The hex color code of the link color.
  * @param string $buttonBackgroundColor The hex color code of the button background.
  * @return Gdn_Email The email object with the test colors set.
  */
 public function getTestEmail($image = '', $textColor = '', $backGroundColor = '', $containerBackgroundColor = '', $buttonTextColor = '', $buttonBackgroundColor = '')
 {
     $emailer = new Gdn_Email();
     $email = $emailer->getEmailTemplate();
     if ($image) {
         $email->setImage($image);
     }
     if ($textColor) {
         $email->setTextColor($textColor);
     }
     if ($backGroundColor) {
         $email->setBackgroundColor($backGroundColor);
     }
     if ($backGroundColor) {
         $email->setContainerBackgroundColor($containerBackgroundColor);
     }
     if ($buttonTextColor) {
         $email->setDefaultButtonTextColor($buttonTextColor);
     }
     if ($buttonBackgroundColor) {
         $email->setDefaultButtonBackgroundColor($buttonBackgroundColor);
     }
     $message = t('Test Email Message');
     $email->setMessage($message)->setTitle(t('Test Email'))->setButton(externalUrl('/'), t('Check it out'));
     $emailer->setEmailTemplate($email);
     return $emailer;
 }
开发者ID:vanilla,项目名称:vanilla,代码行数:38,代码来源:class.settingscontroller.php

示例5: sendPasswordEmail

 /**
  * Send password email.
  *
  * @param $UserID
  * @param $Password
  * @throws Exception
  */
 public function sendPasswordEmail($UserID, $Password)
 {
     $Session = Gdn::session();
     $Sender = $this->getID($Session->UserID);
     $User = $this->getID($UserID);
     $AppTitle = Gdn::config('Garden.Title');
     $Email = new Gdn_Email();
     $Email->subject('[' . $AppTitle . '] ' . t('Reset Password'));
     $Email->to($User->Email);
     $greeting = formatString(t('Hello %s!'), val('Name', $User));
     $message = '<p>' . $greeting . ' ' . sprintf(t('%s has reset your password at %s.'), val('Name', $Sender), $AppTitle) . ' ' . t('Find your account information below.') . '<br></p>' . '<p>' . sprintf(t('%s: %s'), t('Email'), val('Email', $User)) . '<br>' . sprintf(t('%s: %s'), t('Password'), $Password) . '</p>';
     $emailTemplate = $Email->getEmailTemplate()->setTitle(t('Reset Password'))->setMessage($message)->setButton(externalUrl('/'), t('Access the Site'));
     $Email->setEmailTemplate($emailTemplate);
     $Email->send();
 }
开发者ID:bahill,项目名称:vanilla,代码行数:22,代码来源:class.usermodel.php

示例6: _formatStringCallback


//.........这里部分代码省略.........
                     $Value = 1;
                 }
                 if (!is_numeric($Value)) {
                     $Result = $Value;
                 } else {
                     if (!$SubFormat) {
                         $SubFormat = rtrim("%s {$Field}", 's');
                     }
                     if (!$FormatArgs) {
                         $FormatArgs = $SubFormat . 's';
                     }
                     $Result = Plural($Value, $SubFormat, $FormatArgs);
                 }
                 break;
             case 'rawurlencode':
                 $Result = rawurlencode($Value);
                 break;
             case 'text':
                 $Result = Gdn_Format::text($Value, false);
                 break;
             case 'time':
                 $Result = Gdn_Format::date($Value, '%l:%M%p');
                 break;
             case 'url':
                 if (strpos($Field, '/') !== false) {
                     $Value = $Field;
                 }
                 $Result = Url($Value, $SubFormat == 'domain');
                 break;
             case 'exurl':
                 if (strpos($Field, '/') !== false) {
                     $Value = $Field;
                 }
                 $Result = externalUrl($Value);
                 break;
             case 'urlencode':
                 $Result = urlencode($Value);
                 break;
             case 'gender':
                 // Format in the form of FieldName,gender,male,female,unknown[,plural]
                 if (is_array($Value) && count($Value) == 1) {
                     $Value = array_shift($Value);
                 }
                 $Gender = 'u';
                 if (!is_array($Value)) {
                     $User = Gdn::userModel()->getID($Value);
                     if ($User) {
                         $Gender = $User->Gender;
                     }
                 } else {
                     $Gender = 'p';
                 }
                 switch ($Gender) {
                     case 'm':
                         $Result = $SubFormat;
                         break;
                     case 'f':
                         $Result = $FormatArgs;
                         break;
                     case 'p':
                         $Result = val(5, $Parts, val(4, $Parts));
                         break;
                     case 'u':
                     default:
                         $Result = val(4, $Parts);
                 }
开发者ID:sitexa,项目名称:vanilla,代码行数:67,代码来源:functions.general.php

示例7: trace

<?php

trace(__FILE__, 'begin');
/**
 * @author Alex Mayhew
 * @copyright 2008
 */
set_page_title(!$iscurrev ? lang('viewing revision of', $revision->getRevision(), $revision->getName()) : $revision->getName() . ' [' . $revision->getPageId() . ']');
project_tabbed_navigation();
project_crumbs(array(array(lang('wiki'), get_url('wiki')), array($revision->getName())));
if ($page->canAdd(logged_user(), active_project())) {
    add_page_action(lang('add wiki page'), $page->getAddUrl());
}
// if
if ($page->canEdit(logged_user(), active_project()) && !$page->isNew()) {
    add_page_action(lang('edit wiki page'), $page->getEditUrl());
    add_page_action(lang('view page history'), $page->getViewHistoryUrl());
}
// if
if ($page->canDelete(logged_user(), active_project()) && !$page->isNew() && $iscurrev) {
    add_page_action(lang('delete wiki page'), $page->getDeleteUrl());
}
add_page_action(lang('wiki public wiki'), externalUrl(ROOT_URL . '/' . PUBLIC_FOLDER . '/wiki'));
?>

<div id="wiki-page-content"><?php 
echo do_textile(plugin_manager()->apply_filters('wiki_text', do_textile($revision->getContent())));
?>
</div>
开发者ID:bklein01,项目名称:Project-Pier,代码行数:29,代码来源:view.php

示例8: gettingStarted

 /**
  * Prompts new admins how to get started using new install.
  *
  * @since 2.0.0
  * @access public
  */
 public function gettingStarted()
 {
     $this->permission('Garden.Settings.Manage');
     $this->setData('Title', t('Getting Started'));
     $this->addSideMenu('dashboard/settings/gettingstarted');
     $this->TextEnterEmails = t('TextEnterEmails', 'Type email addresses separated by commas here');
     if ($this->Form->authenticatedPostBack()) {
         // Do invitations to new members.
         $Message = $this->Form->getFormValue('InvitationMessage');
         $Message = trim($Message);
         $Recipients = $this->Form->getFormValue('Recipients');
         if ($Recipients == $this->TextEnterEmails) {
             $Recipients = '';
         }
         $Recipients = explode(',', $Recipients);
         $CountRecipients = 0;
         foreach ($Recipients as $Recipient) {
             if (trim($Recipient) != '') {
                 $CountRecipients++;
                 if (!validateEmail($Recipient)) {
                     $this->Form->addError(sprintf(t('%s is not a valid email address'), $Recipient));
                 }
             }
         }
         if ($CountRecipients == 0) {
             $this->Form->addError(t('You must provide at least one recipient'));
         }
         if ($this->Form->errorCount() == 0) {
             $Email = new Gdn_Email();
             $Email->subject(t('Check out my new community!'));
             $emailTemplate = $Email->getEmailTemplate();
             $emailTemplate->setMessage($Message, true)->setButton(externalUrl('/'), t('Check it out'));
             $Email->setEmailTemplate($emailTemplate);
             foreach ($Recipients as $Recipient) {
                 if (trim($Recipient) != '') {
                     $Email->to($Recipient);
                     try {
                         $Email->send();
                     } catch (Exception $ex) {
                         $this->Form->addError($ex);
                     }
                 }
             }
         }
         if ($this->Form->errorCount() == 0) {
             $this->informMessage(t('Your invitations were sent successfully.'));
         }
     }
     $this->render();
 }
开发者ID:R-J,项目名称:vanilla,代码行数:56,代码来源:class.settingscontroller.php

示例9: MakeMindMap

  /**
   *Make Mn
   *@return string
   */        
  function MakeMindMap(){
      // header xml data freemind
      $content = "<map version=\"0.9.0\">\n";
      $content .= "<!-- To view this file, download free mind mapping software FreeMind from http://freemind.sourceforge.net -->\n";
      $mytime = time();

      // is logged ?     
      if (!logged_user()->isProjectUser(active_project())) {
        echo $content;
        echo "<node CREATED=\"$mytime\" ID=\"Freemind_Link_558888646\" MODIFIED=\"$mytime\" STYLE=\"bubble\" TEXT=\"Disconnected\">\n";
        echo "</node>\n";
        echo "</map>\n";
        die; 
      } // if
      // is user can view this project ??
      if (!ProjectFile::canView(logged_user(), active_project())) {
        echo $content;
        echo "<node CREATED=\"$mytime\" ID=\"Freemind_Link_558888646\" MODIFIED=\"$mytime\" STYLE=\"bubble\" TEXT=\"Not Allowed\">\n";
        echo "</node>\n";
        echo "</map>\n";
        die;
      } //if
      
      /*
      * xml data construction freemind for project
      */    
      $project = active_project();
      $project_name = $project->getName();
      $this->epure($project_name);
      //Project title
      $url = externalUrl(get_url('task','index'));
      $content .= "<node CREATED=\"$mytime\" LINK=\"$url\" MODIFIED=\"$mytime\" STYLE=\"bubble\" TEXT=\"$project_name\">\n";

      //milestones
      $milestones = $project->getMilestones();
      $mymilestone = array();
      if (is_array($milestones)) {
        foreach($milestones as $milestone){
	  $url = externalUrl(get_url('milestone','view',array('id' => $milestone->getId())));
	  $content .= "<node CREATED=\"$mytime\" LINK=\"$url\" POSITION=\"right\" MODIFIED=\"$mytime\" TEXT=\"  [" . $milestone->getName() . ' ' . Localization::instance()->formatDate($milestone->getDueDate()) . "]\">\n";
	  $content .= "<font NAME=\"SansSerif\" BOLD=\"true\" SIZE=\"12\"/>";
          $content .= "<icon BUILTIN=\"messagebox_warning\"/>\n";
          $content .= "<icon BUILTIN=\"messagebox_warning\"/>\n";
          $content .= "</node>\n";
        }
      }

      $task_lists = $project->getTaskLists();
      if (is_array($task_lists)) {
        //Tasks lists
        $positions = array('right','left');
        $actualpos = 0;
        foreach ($task_lists as $task_list) {
          /*
          * security access
          */      
          //security access User can view this task_list ?
          if (!ProjectTaskList::canView(logged_user(), $task_list->getId())) continue;
          
          // task list name
          $task_list_name=$task_list->getName();
	  //Complete or not complete
	  $progress = $this->progress($task_list);
	  $icon = null;
	  $tasklistComplete = false;
	  if ($progress[0] == '100'){
	    $icon .= "<icon BUILTIN=\"button_ok\"/>\n";
	    $tasklistComplete = true;
	  }
	  $kt_tl_var = 'tl:' . $task_list_name;
      $this->epure($kt_tl_var);
	  if (strlen($task_list_name) > 40) $task_list_name = substr($task_list_name,0,40) . "...";
          $position = $positions[$actualpos];
          $url = externalUrl(get_url('task','view_list',array('id' => $task_list->getId())));
          $content .= "<node CREATED=\"$mytime\" LINK=\"$url\" MODIFIED=\"$mytime\" POSITION=\"$position\" TEXT=\"$task_list_name\">\n";
	  $content .= "$icon";
          if ($actualpos == 0){
            $actualpos =1;            
          }else{
            $actualpos =0;            
          } //if
          //tasks
          $tasks = $task_list->getTasks();
          if (is_array($tasks)) {
            foreach($tasks as $task) {
              /*
              * security access
              */      
              //security access User can view this task ?
              if (!ProjectTask::canView(logged_user(), $task->getId())) continue;

              // icon freeming ok | cancel              
              $icon = null;
	      if (!$tasklistComplete){
		if ($task->isCompleted()) {          
		  //complete : icon ok
//.........这里部分代码省略.........
开发者ID:pombredanne,项目名称:ArcherSys,代码行数:101,代码来源:Reports.class.php

示例10: renderCalendar

 /**
  * Render icalendar from milestones
  *
  * @param string $calendar_name
  * @param array $milestones
  * @return null
  */
 private function renderCalendar(User $user, $calendar_name, $milestones, $user_active_projects)
 {
     $calendar = new iCalendar_Calendar();
     $calendar->setPropertyValue('VERSION', '2.0');
     $calendar->setPropertyValue('PRODID', '-//Apple Computer\\, Inc//iCal 1.5//EN');
     $calendar->setPropertyValue('X-WR-CALNAME', $calendar_name);
     $calendar->setPropertyValue('X-WR-TIMEZONE', 'GMT');
     if (is_array($user_active_projects)) {
         foreach ($user_active_projects as $project) {
             $assigned_tasks = $project->getUsersTasks(logged_user());
             if (is_array($assigned_tasks)) {
                 foreach ($assigned_tasks as $task) {
                     $todo = new iCalendar_Todo();
                     $todo->setPropertyValue('SUMMARY', $project->getName() . ": " . $task->getText());
                     $todo->setPropertyValue('UID', 'a9idfv00fd99q344o' . rand() . 'cgef733m6bs@google.com');
                     $date = $task->getDueDate();
                     if (!is_null($date)) {
                         $todo->setPropertyValue('DTSTART', $date->format('Ymd'), array('VALUE' => 'DATE'));
                     }
                     $priority = $task->getTaskList()->getPriority();
                     $priority = $priority ? $priority : 1;
                     $todo->setPropertyValue('PRIORITY', $priority);
                     $todo->setPropertyValue('STATUS', "NEEDS-ACTION");
                     $todo->setPropertyValue('URL', externalUrl($task->getCompleteUrl()));
                     $todo->setPropertyValue('DESCRIPTION', 'Bla Bla Bla');
                     // seting an alarm
                     $alarm = new iCalendar_Alarm();
                     $alarm->setPropertyValue('ACTION', 'DISPLAY');
                     $alarm->setPropertyValue('TRIGGER', '-P7D');
                     $alarm->setPropertyValue('DESCRIPTION', $project->getName() . ": " . $task->getText());
                     $todo->addComponent($alarm);
                     // end alarm
                     $calendar->addComponent($todo);
                 }
             }
         }
     }
     if (is_array($milestones)) {
         foreach ($milestones as $milestone) {
             if (!$user->isMemberOfOwnerCompany() && $milestone->isPrivate()) {
                 continue;
                 // hide private milestone
             }
             if (!$milestone->isCompleted()) {
                 $event = new iCalendar_Event();
                 $date = $milestone->getDueDate();
                 $event->setPropertyValue('DTSTART', $date->format('Ymd'), array('VALUE' => 'DATE'));
                 $date->advance(24 * 60 * 60);
                 $event->setPropertyValue('DTEND', $date->format('Ymd'), array('VALUE' => 'DATE'));
                 $event->setPropertyValue('UID', 'a9idfv00fd99q344o' . rand() . 'cgef733m6bs@google.com');
                 $event->setPropertyValue('SUMMARY', $milestone->getName() . ' (' . $milestone->getProject()->getName() . ')');
                 $event->setPropertyValue('DESCRIPTION', $desc = $milestone->getDescription());
                 $event->setPropertyValue('URL', externalUrl($milestone->getViewUrl()));
                 // setting an alarm
                 $alarm = new iCalendar_Alarm();
                 $alarm->setPropertyValue('ACTION', 'DISPLAY');
                 $alarm->setPropertyValue('TRIGGER', '-P7D');
                 $alarm->setPropertyValue('DESCRIPTION', $milestone->getName() . ' (' . $milestone->getProject()->getName() . ')');
                 $event->addComponent($alarm);
                 // end alarm
                 /* pre_var_dump($desc); */
                 $calendar->addComponent($event);
             }
             // if
         }
         // foreach
     }
     // if
     header('Content-Disposition: inline; filename=calendar.ics');
     $this->renderText(iCalendar::render($calendar), true);
     session_write_close();
     die;
 }
开发者ID:bklein01,项目名称:Project-Pier,代码行数:80,代码来源:FeedController.class.php

示例11: queueNotification

 /**
  * Queue a notification for sending.
  *
  * @since 2.0.17
  * @access public
  * @param int $ActivityID
  * @param string $Story
  * @param string $Position
  * @param bool $Force
  */
 public function queueNotification($ActivityID, $Story = '', $Position = 'last', $Force = false)
 {
     $Activity = $this->getID($ActivityID);
     if (!is_object($Activity)) {
         return;
     }
     $Story = Gdn_Format::text($Story == '' ? $Activity->Story : $Story, false);
     // If this is a comment on another activity, fudge the activity a bit so that everything appears properly.
     if (is_null($Activity->RegardingUserID) && $Activity->CommentActivityID > 0) {
         $CommentActivity = $this->getID($Activity->CommentActivityID);
         $Activity->RegardingUserID = $CommentActivity->RegardingUserID;
         $Activity->Route = '/activity/item/' . $Activity->CommentActivityID;
     }
     $User = Gdn::userModel()->getID($Activity->RegardingUserID, DATASET_TYPE_OBJECT);
     //$this->SQL->select('UserID, Name, Email, Preferences')->from('User')->where('UserID', $Activity->RegardingUserID)->get()->firstRow();
     if ($User) {
         if ($Force) {
             $Preference = $Force;
         } else {
             //            $Preferences = Gdn_Format::Unserialize($User->Preferences);
             $ConfigPreference = c('Preferences.Email.' . $Activity->ActivityType, '0');
             if ($ConfigPreference !== false) {
                 $Preference = val('Email.' . $Activity->ActivityType, $User->Preferences, $ConfigPreference);
             } else {
                 $Preference = false;
             }
         }
         if ($Preference) {
             $ActivityHeadline = Gdn_Format::text(Gdn_Format::activityHeadline($Activity, $Activity->ActivityUserID, $Activity->RegardingUserID), false);
             $Email = new Gdn_Email();
             $Email->subject(sprintf(t('[%1$s] %2$s'), Gdn::config('Garden.Title'), $ActivityHeadline));
             $Email->to($User);
             $url = externalUrl(val('Route', $Activity) == '' ? '/' : val('Route', $Activity));
             $emailTemplate = $Email->getEmailTemplate()->setButton($url, t('Check it out'))->setTitle(Gdn_Format::plainText(val('Headline', $Activity)));
             if ($message = val('Story', $Activity)) {
                 $emailTemplate->setMessage($message, true);
             }
             $Email->setEmailTemplate($emailTemplate);
             if (!array_key_exists($User->UserID, $this->_NotificationQueue)) {
                 $this->_NotificationQueue[$User->UserID] = array();
             }
             $Notification = array('ActivityID' => $ActivityID, 'User' => $User, 'Email' => $Email, 'Route' => $Activity->Route, 'Story' => $Story, 'Headline' => $ActivityHeadline, 'Activity' => $Activity);
             if ($Position == 'first') {
                 $this->_NotificationQueue[$User->UserID] = array_merge(array($Notification), $this->_NotificationQueue[$User->UserID]);
             } else {
                 $this->_NotificationQueue[$User->UserID][] = $Notification;
             }
         }
     }
 }
开发者ID:bahill,项目名称:vanilla,代码行数:60,代码来源:class.activitymodel.php

示例12: replace_link_link_callback

/**
 * Call back function for user link
 * 
 * @param mixed $matches
 * @return
 */
function replace_link_link_callback($matches)
{
    if (count($matches) < 2) {
        return null;
    }
    // if
    if (!logged_user()->isMemberOfOwnerCompany()) {
        $object = ProjectLinks::findOne(array('conditions' => array('`id` = ? AND `project_id` = ? AND `is_private` = 0 ', $matches[1], active_project()->getId())));
    } else {
        $object = ProjectLinks::findOne(array('conditions' => array('`id` = ? AND `project_id` = ?', $matches[1], active_project()->getId())));
    }
    // if
    if (!$object instanceof ProjectLink) {
        return '<del>' . lang('invalid reference', $matches[0]) . '</del>';
    } else {
        return '<a href="' . externalUrl($object->getViewUrl()) . '" title="' . lang('link') . '">' . $object->getObjectName() . '</a>';
    }
    // if
}
开发者ID:bklein01,项目名称:Project-Pier,代码行数:25,代码来源:init.php

示例13: externalUrl

<!--  
	testing with java applet - dont works
	The problem is the param browsemode_initial_map which only accep stricly file and not php generation !!!

 -->
<div id="mn-page-content" style="height:<?php 
echo $ObjHeight;
?>
;display:none">
  <applet code="freemind.main.FreeMindApplet.class" archive="<?php 
echo externalUrl('/application/plugins/reports/freemindbrowser.jar');
?>
" width="100%" height="100%">
    <param name="type" value="application/x-java-applet;version=1.4" />
    <param name="scriptable" value="false" />
    <param name="modes" value="freemind.modes.browsemode.BrowseMode" />
    <param name="browsemode_initial_map" value="<?php 
echo $urlMindMapFile;
?>
" />
    <param name="initial_mode" value="Browse" />
    <param name="selection_method" value="selection_method_direct" />
  </applet>
</div
开发者ID:bklein01,项目名称:Project-Pier,代码行数:24,代码来源:mindmapjava.php

示例14: lang

. 
<?php 
/* Send the task text body unless the configuration file specifically says not to:
** to prevent sending the body of email messages add the following to config.php
** For config.php:  define('SHOW_MILESTONE_BODY', false);
*/
if (!defined('SHOW_MILESTONE_BODY') or SHOW_MILESTONE_BODY == true) {
    echo "\n----------------\n";
    echo $task->getText();
    echo "\n----------------\n\n";
}
echo lang('view assigned tasks');
?>
:
<?php 
echo str_replace('&amp;', '&', externalUrl($task_assigned->getViewUrl()));
?>
 

Company: <?php 
echo owner_company()->getName();
?>
 
Project: <?php 
echo $task_assigned->getProject()->getName();
?>
 
--
<?php 
echo lang('login') . ': ' . externalUrl(ROOT_URL);
开发者ID:469306621,项目名称:Languages,代码行数:30,代码来源:task_assigned.php

示例15: send_reports

 function send_reports()
 {
     $company = Companies::findById(1);
     $lTime = time() + 60 * 60 * $company->getTimezone();
     $dayOfWeek = date("l", $lTime);
     $footer = '<a href="' . externalUrl(ROOT_URL) . '">' . externalUrl(ROOT_URL) . "</a>";
     $people = Reminders::findAll(array('conditions' => 'reports_enabled = 1 and report_day = "' . $dayOfWeek . '"'));
     if (is_array($people) && count($people)) {
         foreach ($people as $person) {
             tpl_assign('settings', $person);
             $user = Users::findById($person->getUserId());
             tpl_assign('user', $user);
             $offset = 60 * 60 * $user->getTimezone();
             tpl_assign('offset', $offset);
             $allProjects = $user->getProjects();
             $emailBody = '';
             $recipient = Notifier::prepareEmailAddress($user->getEmail(), $user->getDisplayName());
             foreach ($allProjects as $project) {
                 if ($project->isActive() || $project->getCompletedOn()->getLeftInDays() > -7) {
                     tpl_assign('project', $project);
                     $condition = 'project_id = ' . $project->getId();
                     $condition .= " and is_private = 0 and is_silent = 0";
                     if (!$person->getReportsIncludeEveryone()) {
                         $condition .= ' and taken_by_id = ' . $user->getId();
                     }
                     $logs = array();
                     if ($person->getReportsIncludeActivity()) {
                         $condition .= " and created_on > Interval -7 day + now()";
                         $logs = ApplicationLogs::findAll(array('conditions' => $condition));
                     }
                     tpl_assign('logs', $logs);
                     $taskLists = $project->getAllTaskLists();
                     $emailTaskLists = array();
                     if (is_array($taskLists) && count($taskLists)) {
                         foreach ($taskLists as $taskList) {
                             $condition = 'task_list_id = ' . $taskList->getId();
                             if (!$person->getReportsIncludeEveryone()) {
                                 $condition .= " and assigned_to_user_id = " . $user->getId();
                             }
                             $condition .= " and completed_on > Interval -7 day + now()";
                             $tasks = ProjectTasks::findAll(array('conditions' => $condition));
                             if (is_array($tasks) && count($tasks)) {
                                 $emailTaskLists[] = $taskList;
                             }
                         }
                     }
                     if (count($emailTaskLists) || count($logs)) {
                         tpl_assign('taskLists', $emailTaskLists);
                         $emailBody .= tpl_fetch(get_template_path('report_per_project', 'reminders'));
                         if ($person->getReportsSummarizedBy()) {
                             try {
                                 Notifier::sendEmail($recipient, $recipient, "[ProjectPier] - Project Report - " . $project->getObjectName(), $emailBody . $footer, 'text/html');
                                 // send
                                 $emailBody = '';
                             } catch (Exception $e) {
                                 echo $e;
                             }
                         }
                     }
                 }
             }
             if (strlen($emailBody) && !$person->getReportsSummarizedBy()) {
                 $time = time() + 60 * 60 * $user->getTimezone();
                 try {
                     Notifier::sendEmail($recipient, $recipient, "[ProjectPier] - Activity Report - " . gmdate('Y/m/d', $time), $emailBody . $footer, 'text/html');
                     // send
                     $emailBody = '';
                 } catch (Exception $e) {
                     echo $e;
                 }
             }
         }
     }
 }
开发者ID:bklein01,项目名称:Project-Pier,代码行数:74,代码来源:RemindersController.class.php


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