<!DOCTYPE NETSCAPE-Bookmark-file-1> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"> <!-- This is an automatically generated file. It will be read and overwritten. Do Not Edit! --> <TITLE>Bookmarks</TITLE> <H1>Bookmarks</H1> <DL><p> EOT; $bookmarks = OC_Bookmarks_Bookmarks::findBookmarks(0, 'id', array(), true, -1); foreach ($bookmarks as $bm) { $title = $bm['title']; if (trim($title) === '') { $url_parts = parse_url($bm['url']); $title = isset($url_parts['host']) ? getDomainWithoutExt($url_parts['host']) : $bm['url']; } $file .= '<DT><A HREF="' . $bm['url'] . '" TAGS="' . implode(',', $bm['tags']) . '">'; $file .= htmlspecialchars($title, ENT_QUOTES, 'UTF-8') . '</A>'; if ($bm['description']) { $file .= '<DD>' . htmlspecialchars($bm['description'], ENT_QUOTES, 'UTF-8'); } $file .= "\n"; } $user_name = trim(OCP\User::getDisplayName()) != '' ? OCP\User::getDisplayName() : OCP\User::getUser(); $export_name = '"ownCloud Bookmarks (' . $user_name . ') (' . date('Y-m-d') . ').html"'; header("Cache-Control: private"); header("Content-Type: application/stream"); header("Content-Length: " . strlen($file)); header("Content-Disposition: attachment; filename=" . $export_name); echo $file; exit;
?> <div id="<?php print $sc_sort; ?> " class="personalblock"> <h3> <img src="<?php print OCP\Util::imagePath('storagecharts2', 'move.png'); ?> " /> <?php print $l->t($sc_sort_title) . ' ' . $l->t('for'); ?> "<?php print OC_Group::inGroup(OCP\User::getUser(), 'admin') ? $l->t('all users') : OCP\User::getDisplayName(); ?> " </h3> <div id="<?php print substr($sc_sort, 1); ?> " style="max-width: 100%; height: 400px; margin: 0 auto"></div> <script type="text/javascript">$(document).ready(function(){<?php print OC_DLStChartsLoader::loadChart($sc_sort, $l); ?> });</script> </div> <?php }
p($l->t('Users')); ?> </th> </tr> <?php $users = OCP\User::getUsers(); ?> <?php foreach ($users as $uid) { ?> <tr> <td class="cl_user_item" id="user_<?php echo $uid; ?> " ><?php echo OCP\User::getDisplayName($uid); ?> </td> </tr> <?php } ?> </table> </div> </td> </tr> </table> <a id="button_close_access"><?php p($l->t('Close')); ?> </a>
} else { OCP\JSON::error(array('data' => array('message' => $l->t("Couldn't send mail to following users: %s ", implode(', ', $noMail))))); } break; case 'informRecipientsDisabled': $itemSource = $_POST['itemSource']; $shareType = $_POST['shareType']; $itemType = $_POST['itemType']; $recipient = $_POST['recipient']; \OCP\Share::setSendMailStatus($itemType, $itemSource, $shareType, false); OCP\JSON::success(); break; case 'email': // read post variables $user = OCP\USER::getUser(); $displayName = OCP\User::getDisplayName(); $type = $_POST['itemType']; $link = $_POST['link']; $file = $_POST['file']; $to_address = $_POST['toaddress']; // enable l10n support $l = OC_L10N::get('core'); // setup the email $subject = (string) $l->t('%s shared »%s« with you', array($displayName, $file)); $content = new OC_Template("core", "mail", ""); $content->assign('link', $link); $content->assign('type', $type); $content->assign('user_displayname', $displayName); $content->assign('filename', $file); $text = $content->fetchPage(); $content = new OC_Template("core", "altmail", "");
<td class="cl_poll_url" title="<?php p($l->t('Click to get link')); ?> "><input type="hidden" value="<?php echo $url; ?> " /><?php echo date('d.m.Y H:i', $row['created']); ?> </td> <td> <?php if ($row['owner'] === OCP\User::getUser()) { p($l->t('Yourself')); } else { echo OCP\User::getDisplayName($row['owner']); } //echo OCP\User::getDisplayName($row['owner']); ?> </td> <?php $style = ''; if (isset($row['expire']) && $row['expire']) { if (date('U') > $row['expire']) { $style = ' style="color: red"'; } echo '<td' . $style . '>' . date('d.m.Y', $row['expire']) . '</td>'; } else { echo '<td />'; } ?>
/** * Parse an array and return data in the highCharts format * * @param $operation operation * to do * @param $elements elements * to parse */ public static function arrayParser($operation, $elements, $l, $data_sep = ',', $ck = 'hu_size') { $return = ""; switch ($operation) { case 'pie': $free = $total = 0; foreach ($elements as $element) { $element = $element[0]; $total = $element['stc_total']; $free += $element['stc_used']; $return .= "['" . $element['oc_uid'] . "', " . $element['stc_used'] . "],"; } $return .= "['" . $l->t('Free space') . "', " . ($total - $free) . "]"; break; case 'histo': case 'line': $conf = OC_DLStCharts::getUConfValue($ck, array('uc_val' => 3)); $div = 1; switch ($conf['uc_val']) { case 4: $div = 1024; case 3: $div *= 1024; case 2: $div *= 1024; case 1: $div *= 1024; } foreach ($elements as $user => $data) { $return_tmp = '{"name":"' . $user . '","displayName":"' . OCP\User::getDisplayName($user) . '","data":['; foreach ($data as $number) { $return_tmp .= round($number / $div, 2) . ","; } $return_tmp = substr($return_tmp, 0, -1) . "]}"; $return .= $return_tmp . $data_sep; } $return = substr($return, 0, -strlen($data_sep)); break; } return $return; }
* This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU AFFERO GENERAL PUBLIC LICENSE for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library. If not, see <http://www.gnu.org/licenses/>. * */ OCP\JSON::checkLoggedIn(); $l = new OC_L10N('storagecharts2'); // build user list $uids = OCP\User::getUsers(); $users = array(); foreach ($uids as $user) { array_push($users, '{"name":"' . $user . '","displayName":"' . OCP\User::getDisplayName($user) . '"}'); } if (array_key_exists('s', $_POST) && array_key_exists('k', $_POST) && is_numeric($_POST['s']) && in_array($_POST['k'], array('hu_size', 'hu_size_hus', 'hu_ratio'))) { // Update and save the new configuration OC_DLStCharts::setUConfValue($_POST['k'], $_POST['s']); switch ($_POST['k']) { case 'hu_size': OCP\JSON::encodedPrint(array('data' => array('chart' => OC_DLStChartsLoader::loadChart('chisto_us', $l), 'users' => $users))); break; case 'hu_size_hus': OCP\JSON::encodedPrint(array('data' => array('chart' => OC_DLStChartsLoader::loadChart('clines_usse', $l), 'users' => $users))); break; } } else { // default OCP\JSON::encodedPrint(array('data' => array('chart' => OC_DLStChartsLoader::loadChart('cpie_rfsus', $l), 'users' => $users)));