/**
  * @see Page::assignVariables()
  */
 public function assignVariables()
 {
     parent::assignVariables();
     // disk space in GB
     $di = AdminTools::getDiskInfo();
     if (is_array($di) && count($di)) {
         $totalSpace = StringUtil::formatNumeric($di['TOTAL_SPACE']) . ' GB';
         $freeSpace = StringUtil::formatNumeric($di['FREE_SPACE']) . ' GB (' . StringUtil::formatNumeric($di['FREE_QUOTA']) . '%)';
         $usedSpace = StringUtil::formatNumeric($di['USED_SPACE']) . ' GB (' . StringUtil::formatNumeric($di['USED_QUOTA']) . '%)';
         $this->diskInfo = WCF::getLanguage()->get('wcf.acp.adminTools.diskInfo', array('$totalSpace' => $totalSpace, '$freeSpace' => $freeSpace, '$usedSpace' => $usedSpace));
     }
     WCF::getTPL()->assign(array('wbbExists' => AdminTools::wbbExists(), 'atPHP' => AdminTools::parsePHPConfig(), 'diskInfo' => $this->diskInfo));
 }
 /**
  * Gets the thread rating result for template output.
  *
  * @return	string		thread rating result for template output
  */
 public function getRatingOutput()
 {
     $rating = $this->getRating();
     if ($rating !== false) {
         $roundedRating = round($rating, 0);
     } else {
         $roundedRating = 0;
     }
     $description = '';
     if ($this->ratings > 0) {
         $description = WCF::getLanguage()->get('wbb.board.vote.description', array('$votes' => StringUtil::formatNumeric($this->ratings), '$vote' => StringUtil::formatNumeric($rating)));
     }
     return '<img src="' . StyleManager::getStyle()->getIconPath('rating' . $roundedRating . '.png') . '" alt="" title="' . $description . '" />';
 }
Пример #3
0
 /**
  * Destroys the espionage sondes if they get destroyed.
  */
 protected function destroy()
 {
     $shipCount = 0;
     Spec::storeData($this->getTargetPlanet(), false);
     $specs = Spec::getBySpecType(3, false);
     foreach ($specs as $specObj) {
         $shipCount += $specObj->level;
     }
     $this->destroyChance = pow($this->getOfiara()->spy_tech / $this->getOwner()->spy_tech, 5) * $this->fleet[210] * pow($shipCount, 0.2) / 10;
     $this->destroyChance = min($this->destroyChance, 100);
     $rand = rand(0, 99);
     if ($this->destroyChance > $rand) {
         $this->fight = true;
         $this->simulate();
         $this->generateReport();
     }
     $this->ereport .= WCF::getLanguage()->get('wot.mission.mission6.impact.owner.defenseChance', array('$defenseChance' => StringUtil::formatNumeric(round($this->destroyChance))));
 }
        if (!$this->v['smileyCategory']->disabled) {
            ?>
smileyCategories.set(<?php 
            echo $this->v['smileyCategory']->smileyCategoryID;
            ?>
, '<?php 
            $this->tagStack[] = array('lang', array());
            ob_start();
            echo StringUtil::encodeHTML($this->v['smileyCategory']->title);
            $_langa73fcf5d137c9c2edd3fb4dec8a7ce63e2c179c5 = ob_get_contents();
            ob_end_clean();
            echo WCF::getLanguage()->getDynamicVariable($_langa73fcf5d137c9c2edd3fb4dec8a7ce63e2c179c5, $this->tagStack[count($this->tagStack) - 1][1]);
            array_pop($this->tagStack);
            ?>
 (<?php 
            echo StringUtil::formatNumeric($this->v['smileyCategory']->smileys);
            ?>
)');<?php 
        }
        ?>
	<?php 
    }
}
?>
	
	// init smiley category switcher
	var smileyCategorySwitcher = new SmileyCategorySwitcher(smileyCategories);
	<?php 
if ($this->v['activeTab'] == 'smilies' || $this->v['activeTab'] == '') {
    ?>
		document.observe("dom:loaded", function() {
ob_end_clean();
echo WCF::getLanguage()->getDynamicVariable($_langfcd2a69e3aba94b61dd32ee2e5d49c5ae6e526fa, $this->tagStack[count($this->tagStack) - 1][1]);
array_pop($this->tagStack);
?>
</span></a> &raquo;</li>
	</ul>
	
	<div class="mainHeadline">
		<img src="<?php 
echo StyleManager::getStyle()->getIconPath('membersL.png');
?>
" alt="" />
		<div class="headlineContainer">
			<h2>Mitglieder</h2>
			<p>Insgesamt <?php 
echo StringUtil::formatNumeric($this->v['items']);
?>
 Mitglied<?php 
if ($this->v['items'] != 1) {
    ?>
er<?php 
}
?>
</p>
		</div>
	</div>
	
	<?php 
if (isset($this->v['userMessages'])) {
    echo $this->v['userMessages'];
}
                ?>
 hot<?php 
            }
            ?>
"><?php 
            echo StringUtil::formatNumeric($this->v['thread']->replies);
            ?>
</td>
						<td class="columnViews<?php 
            if ($this->v['thread']->views > BOARD_THREADS_VIEWS_HOT) {
                ?>
 hot<?php 
            }
            ?>
"><?php 
            echo StringUtil::formatNumeric($this->v['thread']->views);
            ?>
</td>
						<td class="columnLastPost">
							<?php 
            if ($this->v['thread']->replies != 0) {
                ?>
								<div class="containerIconSmall">
									<a href="index.php?page=Thread&amp;threadID=<?php 
                echo $this->v['thread']->threadID;
                ?>
&amp;action=lastPost<?php 
                echo SID_ARG_2ND;
                ?>
"><img src="<?php 
                echo StyleManager::getStyle()->getIconPath('goToLastPostS.png');
						<?php 
if (isset($this->v['additionalContent2'])) {
    echo $this->v['additionalContent2'];
}
?>
						
						<?php 
if (count($this->v['friends']) > 0) {
    ?>
							<div class="contentBox">
								<h3 class="subHeadline"><a href="index.php?page=UserFriendList&amp;userID=<?php 
    echo $this->v['userID'];
    echo SID_ARG_2ND;
    ?>
">Friends</a> <span>(<?php 
    echo StringUtil::formatNumeric($this->v['user']->friends);
    ?>
)</span></h3>
								
								<ul class="dataList thumbnailView floatContainer container-1">
									<?php 
    $this->v['tpl']['foreach']['friends']['total'] = count($this->v['friends']);
    $this->v['tpl']['foreach']['friends']['show'] = $this->v['tpl']['foreach']['friends']['total'] > 0 ? true : false;
    $this->v['tpl']['foreach']['friends']['iteration'] = 0;
    if (count($this->v['friends']) > 0) {
        foreach ($this->v['friends'] as $this->v['friend']) {
            $this->v['tpl']['foreach']['friends']['first'] = $this->v['tpl']['foreach']['friends']['iteration'] == 0 ? true : false;
            $this->v['tpl']['foreach']['friends']['last'] = $this->v['tpl']['foreach']['friends']['iteration'] == $this->v['tpl']['foreach']['friends']['total'] - 1 ? true : false;
            $this->v['tpl']['foreach']['friends']['iteration']++;
            ?>
										<li class="floatedElement smallFont<?php 
Пример #8
0
 /**
  * formats a filesize (binary prefix)
  * 
  * For more informations: <http://en.wikipedia.org/wiki/Binary_prefix>
  *
  * @param 	integer 	$byte
  * @param 	integer		$precision
  * @return 	string 		filesize
  */
 public static function formatFilesizeBinary($byte, $precision = 2)
 {
     $symbol = 'Byte';
     if ($byte >= 1024) {
         $byte /= 1024;
         $symbol = 'KiB';
     }
     if ($byte >= 1024) {
         $byte /= 1024;
         $symbol = 'MiB';
     }
     if ($byte >= 1024) {
         $byte /= 1024;
         $symbol = 'GiB';
     }
     if ($byte >= 1024) {
         $byte /= 1024;
         $symbol = 'TiB';
     }
     return StringUtil::formatNumeric(round($byte, $precision)) . ' ' . $symbol;
 }
Пример #9
0
            echo $this->pluginObjects['TemplatePluginFunctionCycle']->execute(array('name' => 'messageCycle'), $this);
            ?>
">
							<div class="messageHeader">
								<p class="messageCount">
									<a href="index.php?page=Thread&amp;postID=<?php 
            echo $this->v['post']->postID;
            ?>
#post<?php 
            echo $this->v['post']->postID;
            ?>
" title="Permalink to post #<?php 
            echo StringUtil::formatNumeric($this->v['startIndex']);
            ?>
" class="messageNumber"><?php 
            echo StringUtil::formatNumeric($this->v['startIndex']);
            ?>
</a>
									<?php 
            if ($this->v['permissions']['canMarkPost']) {
                ?>
										<span class="messageMarkCheckBox">
											<input id="postMark<?php 
                echo $this->v['post']->postID;
                ?>
" type="checkbox" title="Mark post" />
										</span>
									<?php 
            }
            ?>
								</p>
											<span class="digitCaption">Freunde der Freunde</span>
										</div>
									</div>
								</li>
							<?php 
    }
    ?>
							
							<?php 
    if ($this->v['network']['friends3rdGrade']) {
        ?>
								<li class="dynItem">
									<div class="dynBox network3">
										<div class="dynBoxInner">
											<span class="digitDisplay light"><?php 
        echo StringUtil::formatNumeric($this->v['network']['friends3rdGrade']);
        ?>
</span>
											<span class="digitCaption">Freunde dritten Grades</span>
										</div>
									</div>
								</li>
							<?php 
    }
    ?>
						</ul>
					</div>
				<?php 
} else {
    ?>
					<div class="friendsNone">
Пример #11
0
 /**
  * @see Page::readData()
  */
 public function readData()
 {
     parent::readData();
     // get profile options
     require_once WCF_DIR . 'lib/data/user/option/UserOptions.class.php';
     $userOptions = new UserOptions();
     $this->categories = $userOptions->getOptionTree('profile', $this->frame->getUser());
     // move contact information and about me
     foreach ($this->categories as $category => $categoryData) {
         if ($category == 'profile.contact' || $category == 'profile.messenger') {
             foreach ($categoryData['options'] as $key => $option) {
                 if (isset($option['outputData'])) {
                     $this->contactInformation[] = $option['outputData'];
                 } else {
                     if (!empty($option['optionValue']) && (empty($option['outputClass']) || !$userOptions->getOutputObject($option['outputClass']) instanceof UserOptionOutputContactInformation)) {
                         $this->contactInformation[] = array('icon' => '', 'title' => WCF::getLanguage()->get('wcf.user.option.' . $option['optionName']), 'value' => $option['optionValue'], 'url' => '');
                     }
                 }
             }
             unset($this->categories[$category]);
         }
     }
     // add vcard link
     $this->contactInformation[] = array('icon' => StyleManager::getStyle()->getIconPath('vCardM.png'), 'title' => WCF::getLanguage()->get('wcf.user.profile.downloadVCard'), 'value' => StringUtil::encodeHTML($this->frame->getUser()->username), 'url' => 'index.php?page=VCard&amp;userID=' . $this->frame->getUserID() . SID_ARG_2ND);
     // add general informations
     // registration date
     $this->generalInformation[] = array('icon' => StyleManager::getStyle()->getIconPath('registerM.png'), 'title' => WCF::getLanguage()->get('wcf.user.registrationDate'), 'value' => DateUtil::formatTime(null, $this->frame->getUser()->registrationDate));
     // languages
     require_once WCF_DIR . 'lib/acp/form/UserOptionListForm.class.php';
     $languages = array();
     $availableLanguages = UserOptionListForm::getAvailableContentLanguages();
     if (!$this->frame->getUser()->languageIDs) {
         $this->languages = $availableLanguages;
     } else {
         $languageIDs = explode(',', $this->frame->getUser()->languageIDs);
         foreach ($languageIDs as $languageID) {
             if (isset($availableLanguages[$languageID])) {
                 $languages[$languageID] = $availableLanguages[$languageID];
             }
         }
         // sort languages
         StringUtil::sort($languages);
     }
     if (count($languages)) {
         $this->generalInformation[] = array('icon' => StyleManager::getStyle()->getIconPath('languageM.png'), 'title' => WCF::getLanguage()->get('wcf.user.profile.languages'), 'value' => implode(', ', $languages));
     }
     // last activity
     if (!$this->frame->getUser()->isOnline() && (!$this->frame->getUser()->invisible || WCF::getUser()->getPermission('admin.general.canViewInvisible')) && $this->frame->getUser()->lastActivityTime != 0) {
         $this->generalInformation[] = array('icon' => StyleManager::getStyle()->getIconPath('offlineM.png'), 'title' => WCF::getLanguage()->get('wcf.user.lastActivity'), 'value' => DateUtil::formatTime(null, $this->frame->getUser()->lastActivityTime, true));
     }
     // profile visits
     WCF::getTPL()->assign('user', $this->frame->getUser());
     $this->generalInformation[] = array('icon' => StyleManager::getStyle()->getIconPath('visitsM.png'), 'title' => WCF::getLanguage()->get('wcf.user.profile.hits'), 'value' => StringUtil::formatNumeric($this->frame->getUser()->profileHits) . ($this->frame->getUser()->getProfileAge() > 1 ? ' ' . WCF::getLanguage()->getDynamicVariable('wcf.user.profile.hitsPerDay') : ''));
     // get profile visitors
     $sql = "SELECT\t\tavatar.*, user_table.*, visitor.*\n\t\t\tFROM\t\twcf" . WCF_N . "_user_profile_visitor visitor\n\t\t\tLEFT JOIN \twcf" . WCF_N . "_user user_table\n\t\t\tON \t\t(user_table.userID = visitor.userID)\n\t\t\tLEFT JOIN \twcf" . WCF_N . "_avatar avatar\n\t\t\tON \t\t(avatar.avatarID = user_table.avatarID)\n\t\t\tWHERE\t\townerID = " . $this->frame->getUserID() . "\n\t\t\t\t\tAND user_table.userID IS NOT NULL\n\t\t\tORDER BY\ttime DESC";
     $result = WCF::getDB()->sendQuery($sql, 5);
     while ($row = WCF::getDB()->fetchArray($result)) {
         $this->profileVisitors[] = new UserProfile(null, $row);
     }
     // friends
     if (MODULE_MEMBERS_LIST == 1 && $this->frame->getUser()->shareWhitelist) {
         $sql = "SELECT\t\tavatar.*, user_table.*\n\t\t\t\tFROM\t\twcf" . WCF_N . "_user_whitelist friends\n\t\t\t\tLEFT JOIN \twcf" . WCF_N . "_user user_table\n\t\t\t\tON \t\t(user_table.userID = friends.whiteUserID)\n\t\t\t\tLEFT JOIN \twcf" . WCF_N . "_avatar avatar\n\t\t\t\tON \t\t(avatar.avatarID = user_table.avatarID)\n\t\t\t\tWHERE\t\tfriends.userID = " . $this->frame->getUserID() . "\n\t\t\t\t\t\tAND confirmed = 1\n\t\t\t\t\t\tAND user_table.userID IS NOT NULL\n\t\t\t\tORDER BY\tfriends.time DESC";
         $result = WCF::getDB()->sendQuery($sql, 5);
         while ($row = WCF::getDB()->fetchArray($result)) {
             $this->friends[] = new UserProfile(null, $row);
         }
     }
 }
						}
						
						// add button
						document.observe('dom:loaded', function() { 
							$$('#uploadFields input[type=file]').invoke('observe', 'change', uploadFieldChanged);
							$$('#uploadFields a[href*="#delete"]').invoke('observe', 'click', removeUploadField);
						});
						//]]>
					</script>
				<?php 
    }
    ?>
				<input type="submit" name="upload" id="attachmentsInputSubmitButton" value="Hochladen" />
			</div>
			<p class="smallFont">Maximale Anzahl an Dateianhängen: <?php 
    echo StringUtil::formatNumeric($this->v['maxUploads']);
    ?>
<br />
				Maximale Dateigröße: <?php 
    echo $this->pluginObjects['TemplatePluginModifierFilesize']->execute(array($this->v['maxFileSize']), $this);
    ?>
<br />
				Erlaubte Dateiendungen: <?php 
    echo StringUtil::encodeHTML($this->v['allowedExtensions']);
    ?>
</p>
		<?php 
}
?>
		
	</fieldset>
if (!isset($this->pluginObjects['TemplatePluginFunctionCycle'])) {
    require_once WCF_DIR . 'lib/system/template/plugin/TemplatePluginFunctionCycle.class.php';
    $this->pluginObjects['TemplatePluginFunctionCycle'] = new TemplatePluginFunctionCycle();
}
if (!isset($this->pluginObjects['TemplatePluginModifierTime'])) {
    require_once WCF_DIR . 'lib/system/template/plugin/TemplatePluginModifierTime.class.php';
    $this->pluginObjects['TemplatePluginModifierTime'] = new TemplatePluginModifierTime();
}
?>
<div class="contentBox">
	<h3 class="subHeadline"><a href="index.php?form=Search&amp;types[]=post&amp;userID=<?php 
echo $this->v['user']->userID;
echo SID_ARG_2ND;
?>
">Posts</a> <span>(<?php 
echo StringUtil::formatNumeric($this->v['user']->posts);
?>
)</span></h3>
	
	<ul class="dataList">
		<?php 
if (count($this->v['posts']) > 0) {
    foreach ($this->v['posts'] as $this->v['post']) {
        ?>
			<li class="<?php 
        echo $this->pluginObjects['TemplatePluginFunctionCycle']->execute(array('values' => 'container-1,container-2'), $this);
        ?>
">
				<div class="containerIcon">
					<img src="<?php 
        echo StyleManager::getStyle()->getIconPath('postM.png');
Пример #14
0
        if ($this->v['usersOnlineInvisible'] > 0) {
            ?>
	(davon <?php 
            echo StringUtil::formatNumeric($this->v['usersOnlineInvisible']);
            ?>
 unsichtbar)
<?php 
        }
        if ($this->v['usersOnlineGuests'] > 0 && $this->v['usersOnlineMembers'] > 0) {
            ?>
und<?php 
        }
        if ($this->v['usersOnlineGuests'] > 0) {
            ?>
	<?php 
            echo StringUtil::formatNumeric($this->v['usersOnlineGuests']);
            ?>
 Besucher
<?php 
        }
        ?>
</p>
						<?php 
        if (count($this->v['usersOnline'])) {
            ?>
							<p class="smallFont"><?php 
            $_length7296916c432afaf5c3ccb062e71f5fac51c04d93 = count($this->v['usersOnline']);
            $_i7296916c432afaf5c3ccb062e71f5fac51c04d93 = 0;
            foreach ($this->v['usersOnline'] as $this->v['userOnline']) {
                ?>
<a href="index.php?page=User&amp;userID=<?php 
Пример #15
0
            ?>
								<?php 
            if (isset($this->v['activePollID']) && $this->v['activePollID'] == $this->v['pollID'] && $this->v['errorField'] == 'pollOptionID') {
                ?>
									<p class="innerError smallFont">
										<?php 
                if ($this->v['errorType'] == 'notValid') {
                    ?>
You have not chosen a valid answer for this poll. Please choose at least one of the available answers!<?php 
                }
                ?>
										<?php 
                if ($this->v['errorType'] == 'tooMuch') {
                    ?>
You have chosen too many answers for this poll. The maximum allowed votes for this poll is <?php 
                    echo StringUtil::formatNumeric($this->v['poll']->choiceCount);
                    ?>
.<?php 
                }
                ?>
									</p>
								<?php 
            }
            ?>
							</div>
						</div>
							
						<?php 
            if (count($this->v['poll']->getPollOptions()) > 0) {
                foreach ($this->v['poll']->getPollOptions() as $this->v['pollOption']) {
                    ?>
Пример #16
0
        }
        ?>
 - <?php 
        echo StringUtil::formatNumeric($this->v['board']->getPosts());
        ?>
 <?php 
        if ($this->v['board']->getPosts() == 1) {
            ?>
Beitrag<?php 
        } else {
            ?>
Beiträge<?php 
        }
        ?>
 (<?php 
        echo StringUtil::formatNumeric($this->v['board']->getPostsPerDay());
        ?>
 <?php 
        if ($this->v['board']->getPostsPerDay() == 1) {
            ?>
Beitrag<?php 
        } else {
            ?>
Beiträge<?php 
        }
        ?>
 pro Tag)</p>
					</div>
				</div>
			<?php 
    }
x)<?php 
            }
            if (++$_i12545ae4e18f80979a178a2fc9a63aa6476cac7e < $_length12545ae4e18f80979a178a2fc9a63aa6476cac7e) {
                echo ', ';
            }
        }
    }
    ?>
									<?php 
    if ($this->v['errorType'] == 'tooShort') {
        ?>
Der Beitrag ist zu kurz. Der Beitrag muss mindestens <?php 
        echo StringUtil::formatNumeric($this->v['minCharLength']);
        ?>
 Zeichen lang sein und <?php 
        echo StringUtil::formatNumeric($this->v['minWordCount']);
        ?>
 <?php 
        if ($this->v['minWordCount'] == 1) {
            ?>
Wort<?php 
        } else {
            ?>
Wörter<?php 
        }
        ?>
 enthalten.<?php 
    }
    ?>
								</p>
							<?php 
Пример #18
0
    if (MODULE_PM == 1 && $this->v['this']->user->showPmPopup && $this->v['this']->user->pmOutstandingNotifications && count($this->v['this']->user->getOutstandingNotifications()) > 0) {
        ?>
			<div class="info deletable" id="pmOutstandingNotifications">
				<a href="index.php?page=PM&amp;action=disableNotifications&amp;t=<?php 
        echo SECURITY_TOKEN;
        echo SID_ARG_2ND;
        ?>
" class="close deleteButton"><img src="<?php 
        echo StyleManager::getStyle()->getIconPath('closeS.png');
        ?>
" alt="" title="Cancella notifica" longdesc="" /></a>
				<p><?php 
        if ($this->v['this']->user->pmOutstandingNotifications > 1) {
            ?>
Ci sono <?php 
            echo StringUtil::formatNumeric($this->v['this']->user->pmOutstandingNotifications);
            ?>
 messaggi privati nuovi<?php 
        } else {
            ?>
C'è un messaggio privato nuovo <?php 
        }
        ?>
:</p>
				<ul>
					<?php 
        if (count($this->v['this']->user->getOutstandingNotifications()) > 0) {
            foreach ($this->v['this']->user->getOutstandingNotifications() as $this->v['outstandingNotification']) {
                ?>
						<li title="<?php 
                echo StringUtil::encodeHTML($this->v['outstandingNotification']->getMessagePreview());
 href="index.php?page=Attachment&amp;attachmentID=<?php 
                echo $this->v['attachment']->attachmentID;
                ?>
&amp;h=<?php 
                echo $this->v['attachment']->sha1Hash;
                echo SID_ARG_2ND;
                ?>
"><?php 
                echo StringUtil::encodeHTML($this->v['attachment']->attachmentName);
                ?>
</a>
							<span class="smallFont">(<?php 
                echo $this->pluginObjects['TemplatePluginModifierFilesize']->execute(array($this->v['attachment']->attachmentSize), $this);
                ?>
 - <b><?php 
                echo StringUtil::formatNumeric($this->v['attachment']->downloads);
                ?>
</b> mal heruntergeladen<?php 
                if ($this->v['attachment']->downloads > 0) {
                    ?>
 - zuletzt: <?php 
                    echo $this->pluginObjects['TemplatePluginModifierShorttime']->execute(array($this->v['attachment']->lastDownloadTime), $this);
                }
                ?>
)</span>
						</div>
					</li>
				<?php 
            }
        }
        ?>
								<?php 
                if (isset($this->v['child']['additionalBoxes'])) {
                    echo $this->v['child']['additionalBoxes'];
                }
                ?>
							</div>
						</div>
						
						<?php 
                if (isset($this->v['boardStats'][$this->v['boardID']])) {
                    ?>
							<div class="boardlistStats">
								<dl>
									<dt>Clicks:</dt>
									<dd><?php 
                    echo StringUtil::formatNumeric($this->v['board']->getClicks());
                    ?>
</dd>
								</dl>
							</div>
						<?php 
                }
                ?>
					</div>
			<?php 
            }
            ?>
			
			<?php 
            if ($this->v['hasChildren']) {
                ?>
Пример #21
0
    ?>

		<?php 
    if (MODULE_PM == 1 && $this->v['this']->user->showPmPopup && $this->v['this']->user->pmOutstandingNotifications && count($this->v['this']->user->getOutstandingNotifications()) > 0) {
        ?>
			<div class="info deletable" id="pmOutstandingNotifications">
				<a href="index.php?page=PM&amp;action=disableNotifications&amp;t=<?php 
        echo SECURITY_TOKEN;
        echo SID_ARG_2ND;
        ?>
" class="close deleteButton"><img src="<?php 
        echo StyleManager::getStyle()->getIconPath('closeS.png');
        ?>
" alt="" title="Benachrichtung ausblenden" longdesc="" /></a>
				<p>Sie haben <?php 
        echo StringUtil::formatNumeric(count($this->v['this']->user->getOutstandingNotifications()));
        ?>
 ungelesene private Nachricht<?php 
        if (count($this->v['this']->user->getOutstandingNotifications()) > 1) {
            ?>
en<?php 
        }
        ?>
:</p>
				<ul>
					<?php 
        if (count($this->v['this']->user->getOutstandingNotifications()) > 0) {
            foreach ($this->v['this']->user->getOutstandingNotifications() as $this->v['outstandingNotification']) {
                ?>
						<li title="<?php 
                echo StringUtil::encodeHTML($this->v['outstandingNotification']->getMessagePreview());
Пример #22
0
        }
        ?>
 - <?php 
        echo StringUtil::formatNumeric($this->v['stats']['posts']);
        ?>
 <?php 
        if ($this->v['stats']['posts'] == 1) {
            ?>
Beitrag<?php 
        } else {
            ?>
Beiträge<?php 
        }
        ?>
 (<?php 
        echo StringUtil::formatNumeric($this->v['stats']['postsPerDay']);
        ?>
 <?php 
        if ($this->v['stats']['postsPerDay'] == 1) {
            ?>
Beitrag<?php 
        } else {
            ?>
Beiträge<?php 
        }
        ?>
 pro Tag)<br />
Unser neuestes Mitglied heißt: <a href="index.php?page=User&amp;userID=<?php 
        echo $this->v['stats']['newestMember']->userID;
        echo SID_ARG_2ND;
        ?>
            if ($this->v['spider']['spiderURL']) {
                ?>
<a href="<?php 
                echo StringUtil::encodeHTML($this->v['spider']['spiderURL']);
                ?>
"><?php 
                echo StringUtil::encodeHTML($this->v['spider']['spiderName']);
                ?>
</a><?php 
            } else {
                echo StringUtil::encodeHTML($this->v['spider']['spiderName']);
            }
            if ($this->v['spider']['count'] > 1) {
                ?>
 (<?php 
                echo StringUtil::formatNumeric($this->v['spider']['count']);
                ?>
x)<?php 
            }
            ?>
</p></td>
								<?php 
            if ($this->v['canViewIpAddress']) {
                ?>
									<td class="columnIP"><p><?php 
                echo StringUtil::encodeHTML($this->v['spider']['ipAddress']);
                ?>
</p></td>
									<td class="columnUserAgent" style="width: 30%">
										<div class="containerIcon">
											<?php 
Пример #24
0
 class="active"<?php 
            }
            ?>
><a href="<?php 
            echo RELATIVE_WCF_DIR;
            echo StringUtil::encodeHTML($this->v['quickAccessPackage']['packageDir']);
            ?>
acp/index.php<?php 
            echo SID_ARG_1ST;
            ?>
"><span><?php 
            echo StringUtil::encodeHTML($this->v['quickAccessPackage']['packageName']);
            if ($this->v['quickAccessPackage']['instanceNo'] > 1 && $this->v['quickAccessPackage']['instanceName'] == '') {
                ?>
 #<?php 
                echo StringUtil::formatNumeric($this->v['quickAccessPackage']['instanceNo']);
            }
            ?>
</span></a></li>
									<?php 
        }
    }
    ?>
								</ul>
							</div>
	
							<script type="text/javascript">
								//<![CDATA[
								popupMenuList.register('packageQuickAccess');
								//]]>
							</script>
Пример #25
0
 public function cronRunJournal($pmDelCnt = 0, $cLog = 0, $cStat = 0, $cAdminMail = 0)
 {
     if (!empty($cLog) || !empty($cStat)) {
         require_once WCF_DIR . 'lib/data/mail/Mail.class.php';
         require_once WCF_DIR . 'lib/data/user/User.class.php';
         require_once WCF_DIR . 'lib/system/language/Language.class.php';
         $pR = 45;
         $pL = 35;
         // get default language
         $sql = "SELECT languageID" . "\n  FROM wcf" . WCF_N . "_language" . "\n WHERE isDefault = 1";
         $tmp = WCF::getDB()->getFirstRow($sql);
         $lang = $tmp['languageID'] == WCF::getLanguage()->getLanguageID() ? WCF::getLanguage() : new Language($tmp['languageID']);
         $useStrftime = DateUtil::$useStrftime;
         DateUtil::$useStrftime = $lang->get('wcf.global.dateMethod') == 'strftime';
         $currentDate = DateUtil::formatDate($lang->get('wcf.global.dateFormat'), TIME_NOW);
         $previousDayStart = mktime(0, 0, 0, (int) date("m", TIME_NOW), (int) date("d", TIME_NOW) - 1, (int) date("Y", TIME_NOW));
         $previousDayEnd = mktime(0, 0, -1, (int) date("m", TIME_NOW), (int) date("d", TIME_NOW), (int) date("Y", TIME_NOW));
         $logDate = DateUtil::formatDate($lang->get('wcf.global.dateFormat'), $previousDayStart);
         $spacer = str_repeat('-', 80);
         $mailUserHeader = "\n" . self::str_pad("USER", 26, " ") . self::str_pad("USERID", 12, " ", STR_PAD_LEFT) . "    " . self::str_pad("REG-DATE", 20, " ") . "LAST-ACTIVE" . "\n" . $spacer;
         $subject = $lang->get('wcf.acp.adminTools.cron.mail.subject', array('PAGE_TITLE' => PAGE_TITLE, '$currentDate' => $currentDate));
         $message = $lang->get('wcf.acp.adminTools.cron.mail.header', array('PAGE_TITLE' => PAGE_TITLE));
         // log -----------------------------------------
         if (!empty($cLog)) {
             $message .= "\n\n" . $spacer;
             $message .= "\n" . $lang->get('wcf.acp.adminTools.cron.mail.logHeader', array('$logDate' => $logDate));
             $message .= "\n" . $spacer;
             // deleted PMs -----------------------------
             if (!empty($pmDelCnt)) {
                 $message .= "\n\n" . $lang->get('wcf.acp.adminTools.cron.mail.statsCntDeletedPMs') . ' ' . StringUtil::decodeHTML(StringUtil::formatInteger($pmDelCnt));
             }
             // registrations ---------------------------
             $mailMsg = '';
             $cnt = 0;
             $sql = "SELECT userID" . "\n  FROM wcf" . WCF_N . "_user" . "\n WHERE registrationDate >= " . $previousDayStart . "\n   AND registrationDate <= " . $previousDayEnd . "\n ORDER BY LOWER(username)";
             $result = WCF::getDB()->sendQuery($sql);
             while ($row = WCF::getDB()->fetchArray($result)) {
                 $user = new User($row['userID']);
                 $cnt++;
                 $mailMsg .= "\n" . self::str_pad(StringUtil::encodeHTML($user->username), 26, " ") . self::str_pad($user->userID, 12, " ", STR_PAD_LEFT) . "    " . self::str_pad(DateUtil::formatDate($lang->get('wcf.global.timeFormat'), $user->registrationDate), 20, " ") . DateUtil::formatDate($lang->get('wcf.global.timeFormat'), $user->lastActivityTime);
             }
             $message .= "\n\n";
             $message .= $lang->get('wcf.acp.adminTools.cron.mail.registrations') . ' ' . $cnt . $mailUserHeader;
             if (!empty($cnt)) {
                 $message .= $mailMsg;
             } else {
                 $message .= "\n-";
             }
             // user quits ------------------------------
             $mailMsg = '';
             $cnt = 0;
             $sql = "SELECT userID" . "\n  FROM wcf" . WCF_N . "_user" . "\n WHERE quitStarted > 0" . "\n ORDER BY LOWER(username)";
             $result = WCF::getDB()->sendQuery($sql);
             while ($row = WCF::getDB()->fetchArray($result)) {
                 $user = new User($row['userID']);
                 $cnt++;
                 $mailMsg .= "\n" . self::str_pad(StringUtil::encodeHTML($user->username), 26, " ") . self::str_pad($user->userID, 12, " ", STR_PAD_LEFT) . "    " . self::str_pad(DateUtil::formatDate($lang->get('wcf.global.timeFormat'), $user->registrationDate), 20, " ") . DateUtil::formatDate($lang->get('wcf.global.timeFormat'), $user->lastActivityTime);
                 $quitStarted = DateUtil::formatDate($lang->get('wcf.global.timeFormat'), $user->quitStarted);
                 $quitExec = DateUtil::formatDate($lang->get('wcf.global.timeFormat'), $user->quitStarted + 7 * 86400);
                 $mailMsg .= "\n" . self::str_pad(StringUtil::encodeHTML($lang->get('wcf.acp.adminTools.cron.mail.quitInfo', array('$quitStarted' => $quitStarted, '$quitExec' => $quitExec))), $pL + $pR, " ", STR_PAD_LEFT);
             }
             $message .= "\n\n";
             $message .= $lang->get('wcf.acp.adminTools.cron.mail.quit') . ' ' . $cnt . $mailUserHeader;
             if (!empty($cnt)) {
                 $message .= $mailMsg;
             } else {
                 $message .= "\n-";
             }
             // inactive ------------------------------------
             $mailMsg = '';
             $cnt = 0;
             $sql = "SELECT userID" . "\n  FROM wcf" . WCF_N . "_user" . "\n WHERE activationCode > 0" . "\n ORDER BY LOWER(username)";
             $result = WCF::getDB()->sendQuery($sql);
             while ($row = WCF::getDB()->fetchArray($result)) {
                 $user = new User($row['userID']);
                 $cnt++;
                 $mailMsg .= "\n" . self::str_pad(StringUtil::encodeHTML($user->username), 26, " ") . self::str_pad($user->userID, 12, " ", STR_PAD_LEFT) . "    " . self::str_pad(DateUtil::formatDate($lang->get('wcf.global.timeFormat'), $user->registrationDate), 20, " ") . DateUtil::formatDate($lang->get('wcf.global.timeFormat'), $user->lastActivityTime);
             }
             $message .= "\n\n";
             $message .= $lang->get('wcf.acp.adminTools.cron.mail.inactives') . ' ' . $cnt . $mailUserHeader;
             if (!empty($cnt)) {
                 $message .= $mailMsg;
             } else {
                 $message .= "\n-";
             }
             // banned --------------------------------------
             $mailMsg = '';
             $cnt = 0;
             $sql = "SELECT userID" . "\n  FROM wcf" . WCF_N . "_user" . "\n WHERE banned > 0" . "\n ORDER BY LOWER(username)";
             $result = WCF::getDB()->sendQuery($sql);
             while ($row = WCF::getDB()->fetchArray($result)) {
                 $user = new User($row['userID']);
                 $cnt++;
                 $mailMsg .= "\n" . self::str_pad(StringUtil::encodeHTML($user->username), 26, " ") . self::str_pad($user->userID, 12, " ", STR_PAD_LEFT) . "    " . self::str_pad(DateUtil::formatDate($lang->get('wcf.global.timeFormat'), $user->registrationDate), 20, " ") . DateUtil::formatDate($lang->get('wcf.global.timeFormat'), $user->lastActivityTime);
             }
             $message .= "\n\n";
             $message .= $lang->get('wcf.acp.adminTools.cron.mail.banned') . ' ' . $cnt . $mailUserHeader;
             if (!empty($cnt)) {
                 $message .= $mailMsg;
             } else {
                 $message .= "\n-";
             }
         }
         if (!empty($cStat)) {
             // stats -----------------------------------
             $nStats = array();
             // user
             $sql = "SELECT COUNT(userID) AS user, MAX(userID) AS userMax FROM wcf" . WCF_N . "_user";
             $tmp = WCF::getDB()->getFirstRow($sql);
             foreach ($tmp as $k => $v) {
                 $nStats[$k] = $v;
             }
             $sql = "SELECT SUM(banned) AS userLocked, SUM(disableSignature) AS signLocked FROM wcf" . WCF_N . "_user";
             $tmp = WCF::getDB()->getFirstRow($sql);
             foreach ($tmp as $k => $v) {
                 $nStats[$k] = $v;
             }
             // threads
             if (self::wbbExists()) {
                 $sql = "SELECT COUNT(threadID) AS threads, MAX(threadID) AS threadsMax, SUM(views) AS threadViews FROM wbb" . WBB_N . "_thread";
                 $tmp = WCF::getDB()->getFirstRow($sql);
                 foreach ($tmp as $k => $v) {
                     $nStats[$k] = $v;
                 }
                 $sql = "SELECT COUNT(threadID) AS threadClosed FROM wbb" . WBB_N . "_thread WHERE isClosed = 1";
                 $tmp = WCF::getDB()->getFirstRow($sql);
                 foreach ($tmp as $k => $v) {
                     $nStats[$k] = $v;
                 }
                 // posts
                 $sql = "SELECT COUNT(postID) AS posts, MAX(postID) AS postsMax FROM wbb" . WBB_N . "_post";
                 $tmp = WCF::getDB()->getFirstRow($sql);
                 foreach ($tmp as $k => $v) {
                     $nStats[$k] = $v;
                 }
                 // pm
             }
             $sql = "SELECT COUNT(pmID) AS pms, MAX(pmID) AS pmsMax FROM wcf" . WCF_N . "_pm";
             $tmp = WCF::getDB()->getFirstRow($sql);
             foreach ($tmp as $k => $v) {
                 $nStats[$k] = $v;
             }
             // polls
             $sql = "SELECT COUNT(pollID) AS polls FROM wcf" . WCF_N . "_poll";
             $tmp = WCF::getDB()->getFirstRow($sql);
             foreach ($tmp as $k => $v) {
                 $nStats[$k] = $v;
             }
             // attachments *****************************
             // get decimal point
             $dp = StringUtil::decodeHTML($lang->get('wcf.global.decimalPoint'));
             if (!preg_match('/^[\\,\\.]{1}$/', $dp)) {
                 $dp = ',';
             }
             // get thousands separator
             $tp = StringUtil::decodeHTML($lang->get('wcf.global.thousandsSeparator'));
             if (!preg_match('/^[\\,\\.\\s]{1}$/', $tp)) {
                 $tp = ' ';
             }
             $sql = "SELECT COUNT(attachmentID) AS atCnt, SUM(attachmentSize) AS atSize FROM wcf" . WCF_N . "_attachment WHERE messageID != 0";
             $tmp = WCF::getDB()->getFirstRow($sql);
             foreach ($tmp as $k => $v) {
                 $nStats[$k] = $v;
             }
             if (!empty($nStats['atSize'])) {
                 $atSize = number_format($nStats['atSize'] / pow(1024, 2), 2, $dp, $tp);
             } else {
                 $atSize = 0;
             }
             // avatars
             $sql = "SELECT COUNT(avatarID) AS avatars FROM wcf" . WCF_N . "_avatar WHERE userID > 0";
             $tmp = WCF::getDB()->getFirstRow($sql);
             foreach ($tmp as $k => $v) {
                 $nStats[$k] = $v;
             }
             // record
             $nStats['record'] = USERS_ONLINE_RECORD;
             $nStats['recordTime'] = USERS_ONLINE_RECORD_TIME;
             // mail message
             $message .= "\n\n" . $spacer;
             $message .= "\n" . $lang->get('wcf.acp.adminTools.cron.mail.statsHeader');
             $message .= "\n" . $spacer;
             $di = self::getDiskInfo();
             if (is_array($di) && count($di)) {
                 $totalSpace = StringUtil::decodeHTML(StringUtil::formatNumeric($di['TOTAL_SPACE'])) . ' GB';
                 $freeSpace = StringUtil::decodeHTML(StringUtil::formatNumeric($di['FREE_SPACE'])) . ' GB (' . StringUtil::decodeHTML(StringUtil::formatNumeric($di['FREE_QUOTA'])) . '%)';
                 $usedSpace = StringUtil::decodeHTML(StringUtil::formatNumeric($di['USED_SPACE'])) . ' GB (' . StringUtil::decodeHTML(StringUtil::formatNumeric($di['USED_QUOTA'])) . '%)';
                 $message .= "\n" . self::str_pad($lang->get('wcf.acp.adminTools.cron.mail.diskTotalSpace'), $pR, " ") . self::str_pad($totalSpace, $pL, " ", STR_PAD_LEFT);
                 $message .= "\n" . self::str_pad($lang->get('wcf.acp.adminTools.cron.mail.diskFreeSpace'), $pR, " ") . self::str_pad($freeSpace, $pL, " ", STR_PAD_LEFT);
                 $message .= "\n" . self::str_pad($lang->get('wcf.acp.adminTools.cron.mail.diskUsedSpace'), $pR, " ") . self::str_pad($usedSpace, $pL, " ", STR_PAD_LEFT);
             }
             if (isset($nStats['user'])) {
                 $message .= "\n" . self::str_pad($lang->get('wcf.acp.adminTools.cron.mail.statsCntMembers'), $pR, " ") . self::str_pad(StringUtil::decodeHTML(StringUtil::formatInteger($nStats['user'])), $pL, " ", STR_PAD_LEFT);
             }
             if (isset($nStats['userMax'])) {
                 $message .= "\n" . self::str_pad($lang->get('wcf.acp.adminTools.cron.mail.statsCntMembersMax'), $pR, " ") . self::str_pad(StringUtil::decodeHTML(StringUtil::formatInteger($nStats['userMax'])), $pL, " ", STR_PAD_LEFT);
             }
             if (isset($nStats['userLocked'])) {
                 $message .= "\n" . self::str_pad($lang->get('wcf.acp.adminTools.cron.mail.statsCntMembersLocked'), $pR, " ") . self::str_pad(StringUtil::decodeHTML(StringUtil::formatInteger($nStats['userLocked'])), $pL, " ", STR_PAD_LEFT);
             }
             if (isset($nStats['signLocked'])) {
                 $message .= "\n" . self::str_pad($lang->get('wcf.acp.adminTools.cron.mail.statsCntSignLocked'), $pR, " ") . self::str_pad(StringUtil::decodeHTML(StringUtil::formatInteger($nStats['signLocked'])), $pL, " ", STR_PAD_LEFT);
             }
             if (isset($nStats['threads'])) {
                 $message .= "\n" . self::str_pad($lang->get('wcf.acp.adminTools.cron.mail.statsCntThreads'), $pR, " ") . self::str_pad(StringUtil::decodeHTML(StringUtil::formatInteger($nStats['threads'])), $pL, " ", STR_PAD_LEFT);
             }
             if (isset($nStats['threadsMax'])) {
                 $message .= "\n" . self::str_pad($lang->get('wcf.acp.adminTools.cron.mail.statsCntThreadsMax'), $pR, " ") . self::str_pad(StringUtil::decodeHTML(StringUtil::formatInteger($nStats['threadsMax'])), $pL, " ", STR_PAD_LEFT);
             }
             if (isset($nStats['threadClosed'])) {
                 $message .= "\n" . self::str_pad($lang->get('wcf.acp.adminTools.cron.mail.statsCntThreadsLocked'), $pR, " ") . self::str_pad(StringUtil::decodeHTML(StringUtil::formatInteger($nStats['threadClosed'])), $pL, " ", STR_PAD_LEFT);
             }
             if (isset($nStats['threadViews'])) {
                 $message .= "\n" . self::str_pad($lang->get('wcf.acp.adminTools.cron.mail.statsCntThreadsView'), $pR, " ") . self::str_pad(StringUtil::decodeHTML(StringUtil::formatInteger($nStats['threadViews'])), $pL, " ", STR_PAD_LEFT);
             }
             if (isset($nStats['posts'])) {
                 $message .= "\n" . self::str_pad($lang->get('wcf.acp.adminTools.cron.mail.statsCntPosts'), $pR, " ") . self::str_pad(StringUtil::decodeHTML(StringUtil::formatInteger($nStats['posts'])), $pL, " ", STR_PAD_LEFT);
             }
             if (isset($nStats['postsMax'])) {
                 $message .= "\n" . self::str_pad($lang->get('wcf.acp.adminTools.cron.mail.statsCntPostsMax'), $pR, " ") . self::str_pad(StringUtil::decodeHTML(StringUtil::formatInteger($nStats['postsMax'])), $pL, " ", STR_PAD_LEFT);
             }
             if (isset($nStats['pms'])) {
                 $message .= "\n" . self::str_pad($lang->get('wcf.acp.adminTools.cron.mail.statsCntPMs'), $pR, " ") . self::str_pad(StringUtil::decodeHTML(StringUtil::formatInteger($nStats['pms'])), $pL, " ", STR_PAD_LEFT);
             }
             if (isset($nStats['pmsMax'])) {
                 $message .= "\n" . self::str_pad($lang->get('wcf.acp.adminTools.cron.mail.statsCntPMsMax'), $pR, " ") . self::str_pad(StringUtil::decodeHTML(StringUtil::formatInteger($nStats['pmsMax'])), $pL, " ", STR_PAD_LEFT);
             }
             if (isset($nStats['polls'])) {
                 $message .= "\n" . self::str_pad($lang->get('wcf.acp.adminTools.cron.mail.statsCntPolls'), $pR, " ") . self::str_pad(StringUtil::decodeHTML(StringUtil::formatInteger($nStats['polls'])), $pL, " ", STR_PAD_LEFT);
             }
             if (isset($nStats['atCnt'])) {
                 $message .= "\n" . self::str_pad($lang->get('wcf.acp.adminTools.cron.mail.statsCntAttachments'), $pR, " ") . self::str_pad(StringUtil::decodeHTML(StringUtil::formatInteger($nStats['atCnt'])) . ' (' . $atSize . ' MB)', $pL, " ", STR_PAD_LEFT);
             }
             if (isset($nStats['avatars'])) {
                 $message .= "\n" . self::str_pad($lang->get('wcf.acp.adminTools.cron.mail.statsCntAvatars'), $pR, " ") . self::str_pad(StringUtil::decodeHTML(StringUtil::formatInteger($nStats['avatars'])), $pL, " ", STR_PAD_LEFT);
             }
             if (isset($nStats['record'])) {
                 $message .= "\n" . self::str_pad($lang->get('wcf.acp.adminTools.cron.mail.statsCntRecord'), $pR, " ") . self::str_pad(StringUtil::decodeHTML(StringUtil::formatInteger($nStats['record'])) . ' (' . DateUtil::formatDate($lang->get('wcf.global.timeFormat'), $nStats['recordTime']) . ')', $pL, " ", STR_PAD_LEFT);
             }
         }
         // sendmail ------------------------------------
         if (empty($cAdminMail)) {
             $sendTo = array(MAIL_FROM_NAME => MAIL_FROM_ADDRESS);
         } else {
             $sendTo = MAIL_ADMIN_ADDRESS;
         }
         $mail = new Mail($sendTo, $subject, $message);
         $mail->send();
         // reset datetime
         DateUtil::$useStrftime = $useStrftime;
     }
 }