function module_link_edit() { global $global, $smarty; $obj = new link(); $obj->set_where('lin_id = ' . $global['id']); $smarty->assign('link', $obj->get_one()); }
function updateContent($obj) { $link = new link(); $link->objectInit($obj); unset($link->id); $this->content[$obj->id] = $link; $obj->save(); }
public function index($id = NULL, $page = 1) { if (is_null($id) or is_numeric($id)) { $this->redirect($this->conf['blog_siteurl']); } $tag = $id; $post = new post(); $link = new link(); $comment = new comment(); $this->html->useTheme($this->conf['blog_current_theme']); $info = array(); $info["isAdmin"] = false; if ($this->cookie->check("logged") and $this->cookie->id_user == 1) { $info["isAdmin"] = true; } $this->themes->info = $info; $includes['charset'] = $this->html->charsetTag("UTF-8"); $includes['rssFeed'] = $this->html->includeRSS(); if ($page > 1) { $includes['canonical'] = "<link rel=\"canonical\" href=\"{$this->conf['blog_siteurl']}/tag/" . rawurlencode($post->sql_escape($id)) . "/{$page}\" />"; } else { $includes['canonical'] = "<link rel=\"canonical\" href=\"{$this->conf['blog_siteurl']}/tag/" . rawurlencode($post->sql_escape($id)) . "\" />"; } $this->registry->includes = $includes; $this->plugin->call('index_includes'); $includes = null; foreach ($this->registry->includes as $include) { $includes .= $include; } $this->themes->includes = $includes; $this->themes->links = $link->findAll(); $this->themes->single = false; $total_rows = $post->countPosts(array('status' => 'publish', 'tag' => $tag)); $page = (int) is_null($page) ? 1 : $page; $limit = $this->conf['blog_posts_per_page']; $offset = ($page - 1) * $limit; $limitQuery = $offset . "," . $limit; $targetpage = $this->path . "tag/{$tag}/"; $this->themes->pagination = $this->pagination->init($total_rows, $page, $limit, $targetpage); $posts = $post->getPostsByTag($tag, $limitQuery); foreach ($posts as $k => $p) { $posts[$k]['title'] = htmlspecialchars($p['title']); $posts[$k]['tags'] = $post->getTags($p['ID']); $posts[$k]['comments_count'] = $comment->countCommentsByPost($posts[$k]['ID']); $user = new user(); if ($posts[$k]['id_user'] < 2) { $posts[$k]['autor'] = $user->find(1); } else { $posts[$k]['autor'] = $user->find($posts[$k]['id_user']); } } $this->registry->posts = $posts; $this->plugin->call("index_post_content"); $this->themes->posts = $this->registry->posts; $this->themes->title_for_layout = "{$this->conf['blog_name']} - {$tag}"; $this->render(); }
function add_or_edit_link() { global $smarty, $lang; $lin_id = post('lin_id'); $lin_word = post('lin_word'); $lin_url = post('lin_url'); $lin_img = post('lin_img'); $lin_title = post('lin_title'); if ($lin_img == 'http://' || $lin_img == '') { $lin_img = 'none'; } $obj = new link(); $obj->set_value('lin_word', $lin_word); $obj->set_value('lin_url', $lin_url); $obj->set_value('lin_img', $lin_img); $obj->set_value('lin_title', $lin_title); if ($lin_id != '') { $obj->set_where("lin_id = {$lin_id}"); $obj->edit(); $info_text = '修改友情链接成功'; } else { $obj->set_value('lin_lang', S_LANG); $obj->add(); $info_text = '添加友情链接成功'; } $smarty->assign('info_text', $info_text); $smarty->assign('link_text', $lang['return_list']); $smarty->assign('link_href', url(array('channel' => 'service', 'mod' => 'link_list'))); }
function module_link() { global $smarty; $obj = new link(); $obj->set_field('lin_url,lin_img,lin_word,lin_title'); $obj->set_where("lin_img <> 'none'"); $smarty->assign('img_link', $obj->get_list()); $obj = new link(); $obj->set_field('lin_url,lin_img,lin_word,lin_title'); $obj->set_where("lin_img = 'none'"); $smarty->assign('word_link', $obj->get_list()); }
public function getEdit($id) { Allow::permission($this->module['group'], 'groups'); if ($id == 1 && !Allow::superuser()) { Redirect(link::auth($this->module['rest'])); } $groups = Group::all(); $group = Group::find($id); $mod_actions = Config::get('mod_actions'); $mod_info = Config::get('mod_info'); #Helper::dd($mod_actions); #Helper::dd($mod_info); $group_actions = Action::where('group_id', $group->id)->get(); #$actions = $group->actions(); $actions = array(); foreach ($group_actions as $action) { #Helper::d($action->status); #continue; if ($action->status) { $actions[$action->module][$action->action] = $action->status; } } #Helper::dd($actions); $group_actions = $actions; return View::make($this->module['tpl'] . 'edit', compact('groups', 'group', 'mod_actions', 'mod_info', 'group_actions')); }
public function GetLinks() { $link = new link(); $sql = "\n\t\tSELECT lid, header, www, description, type, date\n\t\tFROM links\n\t\t"; $stmt = DBConnection::getInstance()->Prepare($sql); if ($stmt = DBConnection::getInstance()->Prepare($sql)) { $stmt->execute(); $result = $stmt->fetchAll(PDO::FETCH_OBJ); } if (is_array($result)) { foreach ($result as $object) { $m_links[] = $link->createLink($object->lid, $object->header, $object->www, $object->description, $object->type, $object->date); } } return $m_links; }
public function __construct($dsn, $username = null, $password = null, $options = []) { parent::__construct(); $this->_dsn = $dsn; $this->_username = $username; $this->_password = $password; $this->_options = $options; }
/** * create thumbnail from existing image with max sizes * * @param link $im - ImageMagick object * @param string $targetFilePath * @param int $maxX * @param int $maxY */ public function createThumbnail($im, $sourceInfo, $targetFilePath, $width, $height, $save_dimensions = false) { if ($sourceInfo) { if ($width && $height) { if ($save_dimensions) { $ratio_orig = $sourceInfo[0] / $sourceInfo[1]; if ($width / $height > $ratio_orig) { $width = round($height * $ratio_orig); } else { $height = round($width / $ratio_orig); } } if ($sourceInfo[0] < $width) { $width = $sourceInfo[0]; $height = $sourceInfo[1]; } $width && $height ? $im->cropThumbnailImage($width, $height) : false; } $im->setImageCompression(imagick::COMPRESSION_JPEG); $im->setImageCompressionQuality(95); $im->stripImage(); $result = $im->writeImage($targetFilePath); $im->destroy(); return $result; } }
public function checkSession($username) { $link = new link(); $con = $link->connect(); if (!isset($_SESSION['user'])) { return "Session expired"; $session_state = 0; } else { $user_active_session = $_SESSION['user']; $character_get = $_GET['character']; $check_char_belong_session = mysqli_query($con, "SELECT * FROM v_user_characters\n WHERE username = '******' AND character_eve_idcharacter = '{$character_get}'") or die(mysqli_error($con)); if (mysqli_num_rows($check_char_belong_session) == 0) { $session_state = 0; echo "Sneaky sneaky"; //exit(); } else { $session_state = 1; } } }
/** * Method to build the menu in html for display purposes. * * @param string $iconPath The path to the icons within the skins * icons folder. Default: false. * * @return string $menu The menu */ public function show() { $homeLabel = $this->objLanguage->languageText('word_home', 'system', 'Home'); $logoutLabel = $this->objLanguage->languageText('word_logout', 'system', 'Logout'); $confirmLabel = $this->objLanguage->languageText('phrase_confirmlogout'); $home = $this->objConfig->getdefaultModuleName(); $str = '<ul id="menuList" class="adxm">'; //this is not using this javascript menu. its using the css one $str .= '<li id="home" class="navigation-list first" ><a href="' . $this->uri('', $home) . '">' . $homeLabel . '</a></li>'; foreach ($this->menu as $key => $item) { $objLink = new link('#'); $objLink->link = $key . ' '; $str .= '<li id="' . strtolower($key) . '" class="navigation-list">' . $objLink->show() . '<ul class="inner-menu" >' . "\n"; $counter = 1; $numitems = count($item); foreach ($item as $link => $val) { $this->toolbarIcon->setIcon($link, null, 'icons/modules/'); $this->toolbarIcon->title = $val; $this->toolbarIcon->align = 'left'; $this->toolbarIcon->extra = ' vspace="3" hspace="5" width="17" height="17"'; $icon = $this->toolbarIcon->show(); $objLink = new link($this->uri('', $link)); $objLink->link = $icon . '<div class="menulinktext">' . $val . '</div>'; $valLink = $objLink->show(); if ($counter == 1) { $cssclass = 'first'; } else { if ($counter == $numitems) { $cssclass = 'last'; } } $str .= '<li id="" class="' . $cssclass . '">' . $valLink . "</li>\r\n"; $counter++; } $str .= "</ul></li>\n"; } $str .= '<li id="logout" class="navigation-list last"><a href="javascript: if(confirm(\'' . $confirmLabel . '\')) {document.location= \'' . $this->uri(array('action' => 'logoff'), 'security', '', FALSE, TRUE) . '\'};">' . $logoutLabel . '</a></li>'; $str .= "</ul>"; return $str; }
/** * Method to build the menu in html for display purposes. * @param string $iconPath The path to the icons within the skins * icons folder. Default: false. * @return string $menu The menu */ public function show() { $homeLabel = $this->objLanguage->languageText('word_home', 'system', 'Home'); $logoutLabel = $this->objLanguage->languageText('word_logout', 'system', 'Logout'); $confirmLabel = $this->objLanguage->languageText('phrase_confirmlogout'); $postlogin = '******'; //$this->objConfig->getdefaultModuleName(); $home = $this->objConfig->getPrelogin(); $showLogout = FALSE; // Check if the user is logged in if ($this->objUser->isLoggedIn()) { $home = $postlogin; $showLogout = TRUE; } $str = '<ul style="list-style: none; background-color:#fff;">'; // Home link $objLink = new link($this->uri('', $home)); $objLink->link = $homeLabel; $link = $objLink->show(); $str .= '<li style="border-right: 1px #ead0cf dotted; background-image: none;">' . $link . '</li>'; if (!empty($this->menu)) { foreach ($this->menu as $item) { $actArr = !empty($item['action']) ? array('action' => $item['action']) : ''; $objLink = new link($this->uri($actArr, $item['module'])); $objLink->link = $item['text']; $link = $objLink->show(); $str .= '<li style="border-right: 1px #ead0cf dotted; background-image: none;">' . $link . '</li>'; } } if ($showLogout) { $url = $this->uri(array('action' => 'logoff'), 'security'); $objLink = new link("javascript: if(confirm('{$confirmLabel}')) {document.location= '{$url}'};"); $objLink->link = $logoutLabel; $link = $objLink->show(); $str .= '<li style="background-image: none;">' . $link . '</li>'; } $str .= '</ul><br />'; return $str; }
/** * Method to generate the postlogin side menu * @return string Generated menu */ public function show() { // Get menu items $options = $this->objMenu->getSideMenus('elearnpostlogin'); $objUserPic = $this->getObject('imageupload', 'useradmin'); $header = new htmlHeading(); $header->type = 2; $header->str = $this->objUser->fullName(); $str = ''; //$header->show(); $str .= '<p align="center"><img src="' . $objUserPic->userpicture($this->objUser->userId()) . '" alt="User Image" style="margin-bottom: 2px;" /></p>'; //$str .= '<br />'; // First add user pic //$str = $this->sideMenu->userDetails(); $objBlock = $this->getObject('blocks', 'blocks'); $str .= $objBlock->showBlock('mycontexts', 'context', NULL, 20, TRUE, FALSE); // If menu items exist if (count($options) > 0) { // Prepare items - will be sorted alphabetically $menuItems = array(); // Loop through items foreach ($options as $option) { // Get proper name of module $name = ucwords($this->objLanguage->code2Txt('mod_' . $option['module'] . '_name', $option['module'])); // Create link $link = new link($this->uri(NULL, $option['module'])); $link->link = $name; // add to array $menuItems[$name] = $link->show(); } // Sort alphabetically ksort($menuItems); // Generated proper menu $str .= '<ul id="nav-secondary">'; foreach ($menuItems as $item => $link) { $str .= '<li>' . $link . '</li>'; } $str .= '</ul><br />'; } return $str; }
$table->startRow("sysconfig_configsite"); $this->loadClass('link', 'htmlelements'); $link = new link($this->uri(array('action' => 'step2', 'pmodule_id' => '_site_'))); $link->link = 'Configure site parameters'; $objIcon->setIcon('computer'); $table->addCell($objIcon->show()); $table->addCell($link->show(), NULL, NULL, NULL, NULL, 'colspan="3"'); $table->endRow(); //Loop and give the module configs //$modules = array_reverse($modules); $rClass = 'even'; foreach ($modules as $module) { if ($module['pmodule'] != '_site_') { $rClass = $rClass == 'odd' ? 'even' : 'odd'; $table->startRow(); $link = new link($this->uri(array('action' => 'step2', 'pmodule_id' => $module['pmodule']))); $link->link = ucfirst($this->objLanguage->code2Txt('mod_' . $module['pmodule'] . '_name', $module['pmodule'])); $objIcon->setModuleIcon($module['pmodule']); $table->addCell($objIcon->show(), NULL, 'top', NULL, $rClass); $table->addCell($link->show(), NULL, 'top', NULL, $rClass); $table->addCell(ucfirst($this->objLanguage->code2Txt('mod_' . $module['pmodule'] . '_desc', $module['pmodule'])), NULL, 'top', NULL, $rClass); $table->addCell($module['paramcount'], '10%', 'top', NULL, $rClass); $table->endRow(); } } //Set up the title $this->loadClass('htmlheading', 'htmlelements'); $header = new htmlheading(); $header->type = 1; $header->str = $this->objLanguage->languageText("help_sysconfig_about_title", 'sysconfig'); $ret = $header->show() . "<br />" . $table->show();
/** * This method adds rows to the global table. * * @param string $moduleName: Name to be displayed * @param string $iconPicture: Icon to be displayed * @param string $moduleId: Module URI * @param array $linkArray: Additional parameters for URI * @param boolean $iconsFolder: If true, get image from icons folder, else get image from the icons/module folder * @param boolean $popup: Create a link or a popup window */ public function addNavigationRow($moduleName, $iconPicture, $moduleId = null, $linkArray = null, $iconsFolder = false, $popup = false) { $this->loadClass('link', 'htmlelements'); $this->globalTable->startRow(); if ($iconsFolder) { $this->icon->setIcon($iconPicture); } else { $this->icon->setModuleIcon($iconPicture); } $this->icon->alt = $moduleName; $this->icon->title = $moduleName; $this->globalTable->addCell($this->icon->show(), 20, 'absmiddle', 'center'); $moduleLink = new link($this->uri($linkArray, $moduleId)); $moduleLink->link = $moduleName; $this->globalTable->addCell($moduleLink->show(), null, 'absmiddle'); $this->globalTable->endRow(); }
$menu = $this->getObject('menu', 'toolbar'); $toolbar = $menu->show(); // Get any header params or body onload parameters for objects on the toolbar. $menu->getParams($headerParams, $bodyOnLoad); } // Create a variable to hold the Footer depending on the login status. if (isset($footerStr)) { if (isset($this->footerNav)) { $this->footerNav->str = $footerStr; } else { $this->footerNav = new stdClass(); $this->footerNav->str = $footerStr; } } elseif ($objUser->isLoggedIn()) { $this->loadClass('link', 'htmlelements'); $link = new link($this->URI(array('action' => 'logoff'), 'security')); $link->link = $objLanguage->languageText("word_logout"); $footerStr = $objLanguage->languageText("mod_context_loggedinas", 'context') . ' <strong>' . $objUser->fullname() . '</strong> (' . $link->show() . ')'; } // Create an empty array for the header paramseters unless it is already set. if (!isset($headerParams)) { $headerParams = array(); } // Create an empty array for the body onload paramseters unless it is already set. if (!isset($bodyOnLoad)) { $bodyOnLoad = array(); } // Set the header style depending on whether we must suppress banner. if (isset($pageSuppressBanner)) { $headerStyle = "header_no_banner"; } else {
$objLayer->addToStr($heading); $str = $objLayer->show(); $string = ''; if (count($files) == 0) { $string = '<ul><li><b>' . $noMatch . '</b></li></ul>'; } else { $count = 0; $fileIdArray = 'fileId = new Array(' . count($files) . ');'; $filenameArray = 'fileName = new Array(' . count($files) . ');'; $table = $this->newObject('htmltable', 'htmlelements'); $defaultItem = array(); foreach ($files as $file) { $link = new link("javascript:previewFile('" . $file['id'] . "', '" . $count . "');"); $link->link = htmlentities($file['filename']); $link->title = $previewFile; $selectLink = new link("javascript:selectImage('" . $file['id'] . "', '" . $count . "');"); $selectLink->link = $insertImage; $thumbImg = $this->uri(array('action' => 'thumbnail', 'id' => $file['id'])); /* $string = ' <div style="width: 120px; margin-bottom:20px;" class="floatlangdir"> <div style="line-height:120px; vertical-align:center; text-align:center;"> <img src="'.$thumbImg.'" style="vertical-align:middle;" /> </div> <div style="text-align:center;"> '.$selectLink->show().' </div> </div> '; */ $objImage = new image();
public function postCreate() { $input = Input::all(); $validation = Validator::make($input, Gallery::getRules()); if ($validation->fails()) { return Response::json($validation->messages()->toJson(), 400); } else { $id = Gallery::create($input)->id; $href = link::to('admin/galleries/edit/' . $id); return Response::json($href, 200); } }
} } } } if ($folderPermission) { $header->str .= $editLink->show(); } echo $header->show(); echo '<br /><p><strong>' . $this->objLanguage->languageText('word_description', 'system', 'Description') . ':</strong> <em>' . $file['filedescription'] . '</em></p>'; echo '<p><strong>' . $this->objLanguage->languageText('word_tags', 'system', 'Tags') . ':</strong> '; if (count($tags) == 0) { echo '<em>' . $this->objLanguage->languageText('phrase_notags', 'system', 'no tags') . '</em>'; } else { $comma = ''; foreach ($tags as $tag) { $tagLink = new link($this->uri(array('action' => 'viewbytag', 'tag' => $tag))); $tagLink->link = $tag; echo $comma . $tagLink->show(); $comma = ', '; } } echo '</p>'; //$tabContent = $this->newObject('tabcontent', 'htmlelements'); //$tabContent = $this->newObject('jquerytabs', 'htmlelements'); $tabContent = $this->newObject('tabber', 'htmlelements'); $tabContent->width = '90%'; if ($preview != '') { if ($file['category'] == 'images') { // $this->appendArrayVar('headerParams', $this->getJavaScriptFile('jquery.imagefit_0.2.js', 'jquery')); // $this->appendArrayVar('bodyOnLoad', "jQuery('#filemanagerimagepreview').imagefit();"); $preview = '<div id="filemanagerimagepreview">' . $preview . '</div>';
$radio->setSelected('guest'); } // Check if Student if (in_array($result['userid'], $students)) { $radio->setSelected('student'); } // Check if Lecturer if (in_array($result['userid'], $lecturers)) { $radio->setSelected('lecturer'); } $table->addCell($radio->show()); $table->endRow(); } $addUsersForm = new form('addusers', $this->uri(array('action' => 'addusers'))); $button = new button('submitform', $this->objLanguage->languageText('mod_contextgroups_updateuserroles', 'contextgroups')); $button->setToSubmit(); $button->extra = 'style="margin-right: 50px;"'; $hiddenInput = new hiddeninput('context', $contextCode); $addUsersForm->addToForm($hiddenInput->show()); $hiddenInput = new hiddeninput('changedItems', ''); // $hiddenInput->cssId = 'changedItems'; $hiddenInput->extra = 'id="changedItems"'; $addUsersForm->addToForm($hiddenInput->show()); $addUsersForm->addToForm($table->show()); $addUsersForm->addToForm('<p align="right">' . $button->show() . '</p>'); echo $addUsersForm->show(); echo '<p>' . $this->objLanguage->languageText('mod_contextgroups_browseresults', 'contextgroups', 'Browse Results') . ': ' . $paging . '</p>'; } $returnLink = new link($this->uri(NULL)); $returnLink->link = ucwords($this->objLanguage->code2Txt('phrase_returntocontextgroups', 'contextgroups')); echo '<p align="center">' . $returnLink->show() . '</p>';
/** * Assign values for groups that not links * * @param link $xt */ function assignGroupOnly(&$xt) { // assign title between tag a $xt->assign("item".$this->id."_title", $this->title); // assign common attr // $attrForAssign = ' id="itemlink'.$this->id.'" title="'.$this->title.'" '.($this->style ? ' style="cursor:default;text-decoration:none; '.$this->style.'"' : ''); $attrForAssign = ' id="itemlink'.$this->id.'" itemtitle="'.$this->title.'" '.($this->style ? ' style="cursor:default;text-decoration:none; '.$this->style.'"' : ''); $xt->assign("item".$this->id."_menulink_attrs", $attrForAssign); $xt->assign("item".$this->id."_optionattrs","disabled"); }
$pengguna_id = 0; } else { $pengguna_id = $_SESSION['pengguna_id']; } $page = isset($_GET['page']) ? (int) $_GET['page'] : 1; $kategori_id = isset($_GET['kategori_id']) ? (int) $_GET['kategori_id'] : 0; require_once "config/PasswordHash.php"; require_once "config/server.conf.php"; require_once "autoload.php"; $obj = new DB(); $tpl = new template(); $anime = new anime($obj); $pagination = new pagination(); $pengaturan = new pengaturan($obj); $group = new group($obj); $link = new link($obj); $menu = new menu($obj); $pengguna = new pengguna($obj); if (isset($_POST['tambah_kategori'])) { $anime->tambah_kategori($_POST); } if (isset($_POST['tambah_episode'])) { $anime->tambah_episode($_POST); } if (isset($_POST['tambah_link'])) { $link->tambah_link($_POST); } if (isset($_POST['tambah_menu'])) { $menu->tambah_menu($_POST); } if (isset($_POST['tambah_pengguna'])) {
$form->addToForm($table->show()); $button = new button('submitform', $this->objLanguage->languageText('mod_useradmin_updatedetails', 'useradmin', 'Update Details')); $button->setToSubmit(); // $button->setOnClick('validateForm()'); $form->addToForm('<p>' . $button->show() . '</p>'); $form->addRule('useradmin_firstname', $this->objLanguage->languageText('mod_userdetails_enterfirstname', 'userdetails'), 'required'); $form->addRule('useradmin_surname', $this->objLanguage->languageText('mod_userdetails_entersurname', 'userdetails'), 'required'); $form->addRule('useradmin_email', $this->objLanguage->languageText('mod_userdetails_enteremailaddress', 'userdetails'), 'required'); $form->addRule('useradmin_email', $this->objLanguage->languageText('mod_userdetails_entervalidemailaddress', 'userdetails'), 'email'); echo $form->show(); echo '</div>'; echo '<div><div style="width:25%; float: left; padding: 5px;">'; echo '<h3>' . $this->objLanguage->languageText('phrase_userimage', 'userdetails') . ':</h3>'; $objModule = $this->getObject('modules', 'modulecatalogue'); $changeimageform = new form('changeimage', $this->uri(array('action' => 'changeimage'))); $changeimageform->addToForm($useridinput->show()); if ($objModule->checkIfRegistered('filemanager')) { $objSelectFile = $this->getObject('selectimage', 'filemanager'); $objSelectFile->name = 'imageselect'; $objSelectFile->restrictFileList = array('jpg', 'gif', 'png', 'jpeg', 'bmp'); $changeimageform->addToForm($objSelectFile->show()); $button = new button('changeimage', $this->objLanguage->languageText('phrase_updateimage', 'userdetails')); $button->setToSubmit(); $changeimageform->addToForm('<br />' . $button->show()); } echo $changeimageform->show(); echo '</div>'; echo '</div>'; $returnlink = new link($this->uri(NULL)); $returnlink->link = 'Return to User Administration'; echo '<br clear="left" />' . $returnlink->show();
/** * * Make the item linked to enter context * * @param string $contextCode The context to enter * @param string $linkText The text (or image tag) of the link * @return string The rendered link * @access private * */ private function linkItem($contextCode, $linkText) { $link = new link($this->uri(array('action' => 'joincontext', 'contextcode' => $contextCode))); $link->link = $linkText; return $link->show(); }
<?php $this->loadClass('link', 'htmlelements'); echo '<h1>' . $this->objLanguage->languageText('mod_filemanager_overwriteresults', 'filemanager', 'Overwrite Results') . '</h1>'; $results = explode('____', $results); $list = array(); foreach ($results as $result) { $result = explode('__', $result); if (count($result) == 2) { $file = $this->objFiles->getFile($result[0]); if ($file != FALSE) { $link = new link($this->uri(array('action' => 'fileinfo', 'id' => $file['id']))); $link->link = $file['filename']; switch ($result[1]) { case 'overwrite': $list[] = '<span class="confirm">' . $link->show() . ' - ' . $this->objLanguage->languageText('mod_filemanager_filehasbeenoverwritten', 'filemanager', 'file has been overwritten') . '</span>'; break; default: $list[] = $link->show() . ' - ' . $this->objLanguage->languageText('mod_filemanager_filehasnotbeenoverwritten', 'filemanager', 'file has been not been overwritten'); break; } } } } if (count($list) > 0) { echo '<ul>'; foreach ($list as $message) { echo '<li>' . $message . '</li>'; } echo '</ul>'; }
<?php $this->loadClass('htmlheading', 'htmlelements'); $this->loadClass('link', 'htmlelements'); $header = new htmlheading(); $header->type = 1; $header->cssClass = 'error'; $header->str = $this->objLanguage->code2Txt('mod_context_unabletoentercontext', 'context', NULL, 'Unable to enter [-context-]'); echo $header->show(); echo '<p>' . $this->objLanguage->code2Txt('mod_context_unabletoenterinfo', 'context', NULL, 'The [-context-] you tried to enter either does not exist, or is private with access restricted to members only.') . '</p>'; $objNav = $this->getObject('contextadminnav', 'contextadmin'); $str = $this->objLanguage->languageText('word_browse', 'glossary', 'Browse') . ': ' . $objNav->getAlphaListingAjax(); $str .= '<div id="browsecontextcontent"></div>'; $str .= $this->getJavaScriptFile('contextbrowser.js'); echo $str; $link = new link($this->uri(NULL, '_default')); $link->link = $this->objLanguage->languageText('phrase_backhome', 'system', 'Back to home'); echo '<p><br />' . $link->show() . '</p>';
<?php require_once 'tax.php'; require_once 'link.php'; $stationFromID = 60003760; $stationToID = 60008494; $link = new link(); $con = $link->connect(); $character_get = 95060857; $transFrom = "buy"; $transTo = "sell"; $taxcalc = new tax($stationFromID, $stationToID, $con, $character_get, $transFrom, $transTo); /* echo ($taxcalc->getCorpOwnerIDFromStation()); echo ($taxcalc->getCorpOwnerIDToStation()); echo ($taxcalc->getFactionOwnerIDFromStation($taxcalc->getCorpOwnerIDFromStation())); echo ($taxcalc->getFactionOwnerIDToStation($taxcalc->getCorpOwnerIDToStation())); echo $taxcalc->getFromCorpStanding($taxcalc->getCorpOwnerIDFromStation()); echo $taxcalc->getToCorpStanding($taxcalc->getCorpOwnerIDToStation()); echo ($taxcalc->getFromFactionStanding($taxcalc->getFactionOwnerIDFromStation($taxcalc->getCorpOwnerIDFromStation()))); echo ($taxcalc->getToFactionStanding($taxcalc->getFactionOwnerIDToStation($taxcalc->getCorpOwnerIDToStation()))); echo $taxcalc->getBrokerLevel(); echo $taxcalc->getAccountingLevel();*/ echo $taxcalc->calculateBrokerFrom();
public function postStore() { Allow::permission($this->module['group'], 'users'); $json_request = array('status' => FALSE, 'responseText' => '', 'responseErrorText' => '', 'redirect' => FALSE); $input = array('name' => Input::get('name'), 'group_id' => (int) Input::get('group'), 'email' => Input::get('email'), 'password' => Hash::make(Input::get('password1'))); $validation = Validator::make($input, User::$rules); if ($validation->passes()) { $user = User::create($input); #return link::auth('groups'); $json_request['responseText'] = "Пользователь добавлен"; #$json_request['responseText'] = print_r(Input::get('actions'), 1); $json_request['redirect'] = link::auth('system/' . $this->module['rest'] . '/edit/' . $user->id); $json_request['status'] = TRUE; } else { #return Response::json($v->messages()->toJson(), 400); $json_request['responseText'] = 'Неверно заполнены поля'; $json_request['responseErrorText'] = implode($validation->messages()->all(), '<br />'); } return Response::json($json_request, 200); }
/** * Method to create a link for users to use the addthis.com service * @param string $url URL of Page * @return string addthis.com Link */ public function addThis($url = '') { // Check URL $url = $this->checkURL($url); // Create Link $addThis = new link('http://www.addthis.com/bookmark.php?pub=&url=' . $url); $addThis->link = '<img src="' . $this->getResourceURI('socialbookmarking/button1-bm.gif') . '" border="0" width="125" height="16" border="0" />'; return $addThis->show(); }
/** * * Get the link for the skin chooser * * @param string $canvas The canvas code * @param $canvasType The type of canvas (personal, skin) * @return string The formatted link * @access private * */ private function getSkinChooserLink($canvas, $canvasType = 'personal') { $ln = $this->uri(array('action' => 'ask', 'type' => $canvasType, 'key' => 'canvas', 'value' => $canvas), 'canvas'); $objLink = new link($ln); $objLink->link = $canvas; $objLink->rel = 'facebox'; //gb_page_center[640, 480] return $objLink->show(); }