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


PHP mosErrorAlert函数代码示例

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


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

示例1: editSection

 /**
  * @param database A database connector object
  * @param integer The unique id of the category to edit (0 if new)
  */
 public static function editSection($uid, $menutype, $option)
 {
     global $database, $my, $mainframe;
     $menu = new mosMenu($database);
     $menu->load((int) $uid);
     // fail if checked out not by 'me'
     if ($menu->checked_out && $menu->checked_out != $my->id) {
         mosErrorAlert("The module " . $menu->title . " is currently being edited by another administrator");
     }
     if ($uid) {
         $menu->checkout($my->id);
     } else {
         $menu->type = 'content_section';
         $menu->menutype = $menutype;
         $menu->ordering = 9999;
         $menu->parent = intval(mosGetParam($_POST, 'parent', 0));
         $menu->published = 1;
     }
     // build the html select list for section
     $lists['componentid'] = mosAdminMenus::Section($menu, $uid);
     // build the html select list for ordering
     $lists['ordering'] = mosAdminMenus::Ordering($menu, $uid);
     // build the html select list for the group access
     $lists['access'] = mosAdminMenus::Access($menu);
     // build the html select list for paraent item
     $lists['parent'] = mosAdminMenus::Parent($menu);
     // build published button option
     $lists['published'] = mosAdminMenus::Published($menu);
     // build the url link output
     $lists['link'] = mosAdminMenus::Link($menu, $uid);
     // get params definitions
     $params = new mosParameters($menu->params, $mainframe->getPath('menu_xml', $menu->type), 'menu');
     content_section_menu_html::editSection($menu, $lists, $params, $option);
 }
开发者ID:jwest00724,项目名称:Joomla-1.0,代码行数:38,代码来源:content_section.class.php

示例2: editCategory

 /**
  * @param database A database connector object
  * @param integer The unique id of the category to edit (0 if new)
  */
 function editCategory($uid, $menutype, $option)
 {
     global $database, $my, $mainframe;
     $menu = new mosMenu($database);
     $menu->load((int) $uid);
     // fail if checked out not by 'me'
     if ($menu->checked_out && $menu->checked_out != $my->id) {
         mosErrorAlert("O módulo " . $menu->title . " está sendo editado atualmente por outro administrador");
     }
     if ($uid) {
         $menu->checkout($my->id);
     } else {
         $menu->type = 'content_archive_category';
         $menu->menutype = $menutype;
         $menu->ordering = 9999;
         $menu->parent = intval(mosGetParam($_POST, 'parent', 0));
         $menu->published = 1;
     }
     // build the html select list for category
     $lists['componentid'] = mosAdminMenus::Category($menu, $uid);
     // build the html select list for ordering
     $lists['ordering'] = mosAdminMenus::Ordering($menu, $uid);
     // build the html select list for the group access
     $lists['access'] = mosAdminMenus::Access($menu);
     // build the html select list for paraent item
     $lists['parent'] = mosAdminMenus::Parent($menu);
     // build published button option
     $lists['published'] = mosAdminMenus::Published($menu);
     // build the url link output
     $lists['link'] = mosAdminMenus::Link($menu, $uid);
     // get params definitions
     $params = new mosParameters($menu->params, $mainframe->getPath('menu_xml', $menu->type), 'menu');
     content_archive_category_menu_html::editCategory($menu, $lists, $params, $option);
 }
开发者ID:patricmutwiri,项目名称:joomlaclube,代码行数:38,代码来源:content_archive_category.class.php

示例3: edit

 function edit(&$uid, $menutype, $option)
 {
     global $database, $my, $mainframe;
     global $mosConfig_absolute_path;
     $menu = new mosMenu($database);
     $menu->load((int) $uid);
     // fail if checked out not by 'me'
     if ($menu->checked_out && $menu->checked_out != $my->id) {
         mosErrorAlert("O módulo " . $menu->title . " está sendo editado atualmente por outro administrador");
     }
     if ($uid) {
         $menu->checkout($my->id);
     } else {
         // load values for new entry
         $menu->type = 'content_typed';
         $menu->menutype = $menutype;
         $menu->browserNav = 0;
         $menu->ordering = 9999;
         $menu->parent = intval(mosGetParam($_POST, 'parent', 0));
         $menu->published = 1;
     }
     if ($uid) {
         $temp = explode('id=', $menu->link);
         $query = "SELECT a.title, a.title_alias, a.id" . "\n FROM #__content AS a" . "\n WHERE a.id = " . (int) $temp[1];
         $database->setQuery($query);
         $content = $database->loadObjectlist();
         // outputs item name, category & section instead of the select list
         if ($content[0]->title_alias) {
             $alias = '  (<i>' . $content[0]->title_alias . '</i>)';
         } else {
             $alias = '';
         }
         $contents = '';
         $link = 'javascript:submitbutton( \'redirect\' );';
         $lists['content'] = '<input type="hidden" name="content_typed" value="' . $temp[1] . '" />';
         $lists['content'] .= '<a href="' . $link . '" title="Editar conteúdos estáticos">' . $content[0]->title . $alias . '</a>';
     } else {
         $query = "SELECT a.id AS value, CONCAT( a.title, '(', a.title_alias, ')' ) AS text" . "\n FROM #__content AS a" . "\n WHERE a.state = 1" . "\n AND a.sectionid = 0" . "\n AND a.catid = 0" . "\n ORDER BY a.title, a.id";
         $database->setQuery($query);
         $contents = $database->loadObjectList();
         //	Create a list of links
         $lists['content'] = mosHTML::selectList($contents, 'content_typed', 'class="inputbox" size="10"', 'value', 'text', '');
     }
     // build html select list for target window
     $lists['target'] = mosAdminMenus::Target($menu);
     // build the html select list for ordering
     $lists['ordering'] = mosAdminMenus::Ordering($menu, $uid);
     // build the html select list for the group access
     $lists['access'] = mosAdminMenus::Access($menu);
     // build the html select list for paraent item
     $lists['parent'] = mosAdminMenus::Parent($menu);
     // build published button option
     $lists['published'] = mosAdminMenus::Published($menu);
     // build the url link output
     $lists['link'] = mosAdminMenus::Link($menu, $uid);
     // get params definitions
     $params = new mosParameters($menu->params, $mainframe->getPath('menu_xml', $menu->type), 'menu');
     content_menu_html::edit($menu, $lists, $params, $option, $contents);
 }
开发者ID:patricmutwiri,项目名称:joomlaclube,代码行数:59,代码来源:content_typed.class.php

示例4: edit

 /**
  * @param database A database connector object
  * @param integer The unique id of the category to edit (0 if new)
  */
 function edit(&$uid, $menutype, $option)
 {
     global $database, $my, $mainframe;
     $menu = new mosMenu($database);
     $menu->load((int) $uid);
     // fail if checked out not by 'me'
     if ($menu->checked_out && $menu->checked_out != $my->id) {
         mosErrorAlert("The module " . $menu->title . " is currently being edited by another administrator");
     }
     if ($uid) {
         $menu->checkout($my->id);
         // get previously selected Categories
         $params = new mosParameters($menu->params);
         $catids = $params->def('categoryid', '');
         if ($catids) {
             $catidsArray = explode(',', $catids);
             mosArrayToInts($catidsArray);
             $catids = 'c.id=' . implode(' OR c.id=', $catidsArray);
             $query = "SELECT c.id AS `value`, c.section AS `id`, CONCAT_WS( ' / ', s.title, c.title) AS `text`" . "\n FROM #__sections AS s" . "\n INNER JOIN #__categories AS c ON c.section = s.id" . "\n WHERE s.scope = 'content'" . "\n AND ( {$catids} )" . "\n ORDER BY s.name,c.name";
             $database->setQuery($query);
             $lookup = $database->loadObjectList();
         } else {
             $lookup = '';
         }
     } else {
         $menu->type = 'content_blog_category';
         $menu->menutype = $menutype;
         $menu->ordering = 9999;
         $menu->parent = intval(mosGetParam($_POST, 'parent', 0));
         $menu->published = 1;
         $lookup = '';
     }
     // build the html select list for category
     $rows[] = mosHTML::makeOption('', 'All Categories');
     $query = "SELECT c.id AS `value`, c.section AS `id`, CONCAT_WS( ' / ', s.title, c.title) AS `text`" . "\n FROM #__sections AS s" . "\n INNER JOIN #__categories AS c ON c.section = s.id" . "\n WHERE s.scope = 'content'" . "\n ORDER BY s.name,c.name";
     $database->setQuery($query);
     $rows = array_merge($rows, $database->loadObjectList());
     $category = mosHTML::selectList($rows, 'catid[]', 'class="inputbox" size="10" multiple="multiple"', 'value', 'text', $lookup);
     $lists['categoryid'] = $category;
     // build the html select list for ordering
     $lists['ordering'] = mosAdminMenus::Ordering($menu, $uid);
     // build the html select list for the group access
     $lists['access'] = mosAdminMenus::Access($menu);
     // build the html select list for paraent item
     $lists['parent'] = mosAdminMenus::Parent($menu);
     // build published button option
     $lists['published'] = mosAdminMenus::Published($menu);
     // build the url link output
     $lists['link'] = mosAdminMenus::Link($menu, $uid);
     // get params definitions
     $params = new mosParameters($menu->params, $mainframe->getPath('menu_xml', $menu->type), 'menu');
     /* chipjack: passing $sectCatList (categories) instead of $slist (sections) */
     content_blog_category_html::edit($menu, $lists, $params, $option);
 }
开发者ID:jwest00724,项目名称:Joomla-1.0,代码行数:58,代码来源:content_blog_category.class.php

示例5: edit

 /**
  * @param database A database connector object
  * @param integer The unique id of the section to edit (0 if new)
  */
 function edit($uid, $menutype, $option)
 {
     global $database, $my, $mainframe;
     $menu = new mosMenu($database);
     $menu->load((int) $uid);
     // fail if checked out not by 'me'
     if ($menu->checked_out && $menu->checked_out != $my->id) {
         mosErrorAlert("O módulo " . $menu->title . " está sendo editado atualmente por outro administrador");
     }
     if ($uid) {
         $menu->checkout($my->id);
         // get previously selected Categories
         $params = new mosParameters($menu->params);
         $secids = $params->def('sectionid', '');
         if ($secids) {
             $secidsArray = explode(',', $secids);
             mosArrayToInts($secidsArray);
             $secids = 's.id=' . implode(' OR s.id=', $secidsArray);
             $query = "SELECT s.id AS `value`, s.id AS `id`, s.title AS `text`" . "\n FROM #__sections AS s" . "\n WHERE s.scope = 'content'" . "\n AND ( {$secids} )" . "\n ORDER BY s.name";
             $database->setQuery($query);
             $lookup = $database->loadObjectList();
         } else {
             $lookup = '';
         }
     } else {
         $menu->type = 'content_blog_section';
         $menu->menutype = $menutype;
         $menu->ordering = 9999;
         $menu->parent = intval(mosGetParam($_POST, 'parent', 0));
         $menu->published = 1;
         $lookup = '';
     }
     // build the html select list for section
     $rows[] = mosHTML::makeOption('', 'Todas as Seções');
     $query = "SELECT s.id AS `value`, s.id AS `id`, s.title AS `text`" . "\n FROM #__sections AS s" . "\n WHERE s.scope = 'content'" . "\n ORDER BY s.name";
     $database->setQuery($query);
     $rows = array_merge($rows, $database->loadObjectList());
     $section = mosHTML::selectList($rows, 'secid[]', 'class="inputbox" size="10" multiple="multiple"', 'value', 'text', $lookup);
     $lists['sectionid'] = $section;
     // build the html select list for ordering
     $lists['ordering'] = mosAdminMenus::Ordering($menu, $uid);
     // build the html select list for the group access
     $lists['access'] = mosAdminMenus::Access($menu);
     // build the html select list for paraent item
     $lists['parent'] = mosAdminMenus::Parent($menu);
     // build published button option
     $lists['published'] = mosAdminMenus::Published($menu);
     // build the url link output
     $lists['link'] = mosAdminMenus::Link($menu, $uid);
     // get params definitions
     $params = new mosParameters($menu->params, $mainframe->getPath('menu_xml', $menu->type), 'menu');
     content_blog_section_html::edit($menu, $lists, $params, $option);
 }
开发者ID:patricmutwiri,项目名称:joomlaclube,代码行数:57,代码来源:content_blog_section.class.php

示例6: edit

 function edit(&$uid, $menutype, $option)
 {
     global $database, $my, $mainframe;
     $menu = new mosMenu($database);
     $menu->load((int) $uid);
     // fail if checked out not by 'me'
     if ($menu->checked_out && $menu->checked_out != $my->id) {
         mosErrorAlert("O módulo " . $menu->title . " está sendo editado atualmente por outro administrador");
     }
     if ($uid) {
         $menu->checkout($my->id);
     } else {
         // load values for new entry
         $menu->type = 'component_item_link';
         $menu->menutype = $menutype;
         $menu->browserNav = 0;
         $menu->ordering = 9999;
         $menu->parent = intval(mosGetParam($_POST, 'parent', 0));
         $menu->published = 1;
     }
     if ($uid) {
         $temp = explode('&Itemid=', $menu->link);
         $query = "SELECT a.name" . "\n FROM #__menu AS a" . "\n WHERE a.link = " . $database->Quote($temp[0]);
         $database->setQuery($query);
         $components = $database->loadResult();
         $lists['components'] = $components;
         $lists['components'] .= '<input type="hidden" name="link" value="' . $menu->link . '" />';
     } else {
         $query = "SELECT CONCAT( a.link, '&amp;Itemid=', a.id ) AS value, a.name AS text" . "\n FROM #__menu AS a" . "\n WHERE a.published = 1" . "\n AND a.type = 'components'" . "\n ORDER BY a.menutype, a.name";
         $database->setQuery($query);
         $components = $database->loadObjectList();
         //	Create a list of links
         $lists['components'] = mosHTML::selectList($components, 'link', 'class="inputbox" size="10"', 'value', 'text', '');
     }
     // build html select list for target window
     $lists['target'] = mosAdminMenus::Target($menu);
     // build the html select list for ordering
     $lists['ordering'] = mosAdminMenus::Ordering($menu, $uid);
     // build the html select list for the group access
     $lists['access'] = mosAdminMenus::Access($menu);
     // build the html select list for paraent item
     $lists['parent'] = mosAdminMenus::Parent($menu);
     // build published button option
     $lists['published'] = mosAdminMenus::Published($menu);
     // build the url link output
     $lists['link'] = mosAdminMenus::Link($menu, $uid, 1);
     // get params definitions
     $params = new mosParameters($menu->params, $mainframe->getPath('menu_xml', $menu->type), 'menu');
     component_item_link_menu_html::edit($menu, $lists, $params, $option);
 }
开发者ID:patricmutwiri,项目名称:joomlaclube,代码行数:50,代码来源:component_item_link.class.php

示例7: edit

 /**
  * @param database A database connector object
  * @param integer The unique id of the category to edit (0 if new)
  */
 function edit($uid, $menutype, $option)
 {
     global $database, $my, $mainframe;
     $menu = new mosMenu($database);
     $menu->load((int) $uid);
     $row = new mosComponent($database);
     // load the row from the db table
     $row->load((int) $menu->componentid);
     // fail if checked out not by 'me'
     if ($menu->checked_out && $menu->checked_out != $my->id) {
         mosErrorAlert("O módulo " . $menu->title . " está sendo editado atualmente por outro administrador");
     }
     if ($uid) {
         // do stuff for existing item
         $menu->checkout($my->id);
     } else {
         // do stuff for new item
         $menu->type = 'components';
         $menu->menutype = $menutype;
         $menu->browserNav = 0;
         $menu->ordering = 9999;
         $menu->parent = intval(mosGetParam($_POST, 'parent', 0));
         $menu->published = 1;
     }
     $query = "SELECT c.id AS value, c.name AS text, c.link" . "\n FROM #__components AS c" . "\n WHERE c.link != ''" . "\n ORDER BY c.name";
     $database->setQuery($query);
     $components = $database->loadObjectList();
     // build the html select list for section
     $lists['componentid'] = mosAdminMenus::Component($menu, $uid);
     // componentname
     $lists['componentname'] = mosAdminMenus::ComponentName($menu, $uid);
     // build the html select list for ordering
     $lists['ordering'] = mosAdminMenus::Ordering($menu, $uid);
     // build the html select list for the group access
     $lists['access'] = mosAdminMenus::Access($menu);
     // build the html select list for paraent item
     $lists['parent'] = mosAdminMenus::Parent($menu);
     // build published button option
     $lists['published'] = mosAdminMenus::Published($menu);
     // build the url link output
     $lists['link'] = mosAdminMenus::Link($menu, $uid);
     // get params definitions
     $params = new mosParameters($menu->params, $mainframe->getPath('com_xml', $row->option), 'component');
     components_menu_html::edit($menu, $components, $lists, $params, $option);
 }
开发者ID:patricmutwiri,项目名称:joomlaclube,代码行数:49,代码来源:components.class.php

示例8: editCategory

 /**
  * @param database A database connector object
  * @param integer The unique id of the category to edit (0 if new)
  */
 function editCategory($uid, $menutype, $option)
 {
     global $database, $my, $mainframe;
     global $mosConfig_absolute_path;
     $menu = new mosMenu($database);
     $menu->load((int) $uid);
     // fail if checked out not by 'me'
     if ($menu->checked_out && $menu->checked_out != $my->id) {
         mosErrorAlert("O módulo " . $menu->title . " está sendo editado atualmente por outro administrador");
     }
     if ($uid) {
         $menu->checkout($my->id);
     } else {
         $menu->type = 'newsfeed_category_table';
         $menu->menutype = $menutype;
         $menu->ordering = 9999;
         $menu->parent = intval(mosGetParam($_POST, 'parent', 0));
         $menu->published = 1;
     }
     // build list of categories
     $lists['componentid'] = mosAdminMenus::ComponentCategory('componentid', 'com_newsfeeds', intval($menu->componentid), NULL, 'name', 10, 0);
     if ($uid) {
         $query = "SELECT name" . "\n FROM #__categories" . "\n WHERE section = 'com_newsfeeds'" . "\n AND published = 1" . "\n AND id = " . (int) $menu->componentid;
         $database->setQuery($query);
         $category = $database->loadResult();
         $lists['componentid'] = '<input type="hidden" name="componentid" value="' . $menu->componentid . '" />' . $category;
     }
     // build the html select list for ordering
     $lists['ordering'] = mosAdminMenus::Ordering($menu, $uid);
     // build the html select list for the group access
     $lists['access'] = mosAdminMenus::Access($menu);
     // build the html select list for paraent item
     $lists['parent'] = mosAdminMenus::Parent($menu);
     // build published button option
     $lists['published'] = mosAdminMenus::Published($menu);
     // build the url link output
     $lists['link'] = mosAdminMenus::Link($menu, $uid);
     // get params definitions
     $params = new mosParameters($menu->params, $mainframe->getPath('menu_xml', $menu->type), 'menu');
     newsfeed_category_table_menu_html::editCategory($menu, $lists, $params, $option);
 }
开发者ID:patricmutwiri,项目名称:joomlaclube,代码行数:45,代码来源:newsfeed_category_table.class.php

示例9: edit

 /**
  * @param database A database connector object
  * @param integer The unique id of the category to edit (0 if new)
  */
 function edit($uid, $menutype, $option)
 {
     global $database, $my, $mainframe;
     $menu = new mosMenu($database);
     $menu->load((int) $uid);
     // fail if checked out not by 'me'
     if ($menu->checked_out && $menu->checked_out != $my->id) {
         mosErrorAlert("O módulo " . $menu->title . " está sendo editado atualmente por outro administrador");
     }
     if ($uid) {
         // do stuff for existing item
         $menu->checkout($my->id);
     } else {
         // do stuff for new item
         $menu->type = 'separator';
         $menu->menutype = $menutype;
         $menu->browserNav = 0;
         $menu->ordering = 9999;
         $menu->parent = intval(mosGetParam($_POST, 'parent', 0));
         $menu->published = 1;
     }
     if (empty($menu->name)) {
         $menu->name = '- - - - - - -';
     }
     // build the html select list for ordering
     $lists['ordering'] = mosAdminMenus::Ordering($menu, $uid);
     // build the html select list for the group access
     $lists['access'] = mosAdminMenus::Access($menu);
     // build the html select list for paraent item
     $lists['parent'] = mosAdminMenus::Parent($menu);
     // build published button option
     $lists['published'] = mosAdminMenus::Published($menu);
     // get params definitions
     $params = new mosParameters($menu->params, $mainframe->getPath('menu_xml', $menu->type), 'menu');
     separator_menu_html::edit($menu, $lists, $params, $option);
 }
开发者ID:patricmutwiri,项目名称:joomlaclube,代码行数:40,代码来源:separator.class.php

示例10: removeLanguage

/**
* Remove the selected language
*/
function removeLanguage($cid, $option, $client = 'admin')
{
    global $mosConfig_lang;
    josSpoofCheck();
    $client_id = $client == 'admin' ? 1 : 0;
    $cur_language = $mosConfig_lang;
    if ($cur_language == $cid) {
        mosErrorAlert("You can not delete language in use.");
    }
    /*$lang_path = "../language/$cid.php";
    	$lang_ignore_path = "../language/$cid.ignore.php";
    	$xml_path = "../language/$cid.xml";
    
    	unlink($lang_path);
    	unlink($lang_ignore_path);
    	unlink($xml_path);
    	*/
    mosRedirect('index2.php?option=com_installer&element=language&client=' . $client . '&task=remove&cid[]=' . $cid . '&' . josSpoofValue() . '=1');
}
开发者ID:jwest00724,项目名称:Joomla-1.0,代码行数:22,代码来源:admin.languages.php

示例11: editForm


//.........这里部分代码省略.........
             $wildzones = "''";
         }
         $the_advertiser_packages = @implode(",", $the_advertiser_packages);
         if ($the_advertiser_packages == "") {
             $notice_cond = "-1";
         } else {
             $notice_cond = "-1,";
         }
         $sql2 = "SELECT DISTINCT zones FROM #__ad_agency_order_type WHERE tid IN (" . $notice_cond . $the_advertiser_packages . ") ";
         $db->setQuery($sql2);
         $packages_positions = $db->loadResultArray();
         @($packages_positions = implode("','", $packages_positions));
         // If we have one package that contains All Zones, then we don't need a condition
         $packages_positions = str_replace("|", "','", $packages_positions);
         if (!preg_match("/All Zones/i", $packages_positions)) {
             $packages_positions = "('" . $packages_positions . "')";
             $condition = " AND position IN " . $packages_positions . " ";
         }
         if (!isset($condition)) {
             $condition = "";
         }
         if ($wildzones[strlen($wildzones) - 1] == ',') {
             $wildzones = substr($wildzones, 0, strlen($wildzones) - 1);
         }
         if (isset($wildzones[0]) && $wildzones[0] == ',') {
             $wildzones = substr($wildzones, 1, strlen($wildzones));
         }
         if ($wildzones == "" || $wildzones == ",") {
             $wildzones = "''";
         }
         $sql = "SELECT id, title FROM #__modules WHERE module='mod_ijoomla_adagency_zone' " . $condition . " OR id IN (" . $wildzones . ") ORDER BY title ASC";
         $db->setQuery($sql);
         if (!$db->query()) {
             mosErrorAlert($db->getErrorMsg());
             return;
         }
         $the_zzones = $db->loadRowlist();
         $zone[] = JHTML::_('select.option', "0", JText::_('AD_SELECT_ZONE'), 'id', 'title');
         $zone = array_merge($zone, $db->loadObjectList());
         $lists['zone_id'] = JHTML::_('select.genericlist', $zone, 'zone', 'class="inputbox" size="1"', 'id', 'title', $ad->zone);
     } else {
         $no_advertiser_sel = JText::_('ADS_SEL_ADV');
     }
     ///////////////////
     if (isset($the_zzones) && $the_zzones != NULL) {
         $lists['zone_id'] = "<select id='zone' class='inputbox' size='1' name='zone'>\n\t\t\t<option value='0'>" . JText::_("AD_SELECT_ZONE") . "</option>";
         foreach ($the_zzones as $value) {
             if (isset($ad->zone) && $ad->zone == $value[0]) {
                 $current_selected = "selected='selected'";
             } else {
                 $current_selected = "";
             }
             $already[] = $value[0];
             $lists['zone_id'] .= "<option value='" . $value[0] . "' " . $current_selected . ">" . $value[1] . "</option>";
         }
         $sql_allzones = "SELECT z.zoneid, z.z_title\n\t\t\tFROM #__ad_agency_zone AS z\n\t\t\tLEFT JOIN #__modules AS m ON z.zoneid = m.id\n\t\t\tWHERE m.module = 'mod_ijoomla_adagency_zone'";
         $db->setQuery($sql_allzones);
         $all_existing_zones = $db->loadRowlist();
         if (isset($all_existing_zones)) {
             foreach ($all_existing_zones as $currentz) {
                 if (!in_array($currentz[0], $already)) {
                     if (isset($ad->zone) && $ad->zone == $currentz[0]) {
                         $current_selected = "selected='selected'";
                     } else {
                         $current_selected = "";
                     }
开发者ID:politik86,项目名称:test2,代码行数:67,代码来源:view.html.php

示例12: saveRegistration

function saveRegistration()
{
    global $database, $acl;
    global $mosConfig_sitename, $mosConfig_live_site, $mosConfig_useractivation, $mosConfig_allowUserRegistration;
    global $mosConfig_mailfrom, $mosConfig_fromname, $mosConfig_mailfrom, $mosConfig_fromname;
    if ($mosConfig_allowUserRegistration == 0) {
        mosNotAuth();
        return;
    }
    // simple spoof check security
    josSpoofCheck();
    $row = new mosUser($database);
    if (!$row->bind($_POST, 'usertype')) {
        mosErrorAlert($row->getError());
    }
    $row->name = trim($row->name);
    $row->email = trim($row->email);
    $row->username = trim($row->username);
    $row->password = trim($row->password);
    mosMakeHtmlSafe($row);
    $row->id = 0;
    $row->usertype = '';
    $row->gid = $acl->get_group_id('Registered', 'ARO');
    if ($mosConfig_useractivation == 1) {
        $row->activation = md5(mosMakePassword());
        $row->block = '1';
    }
    if (!$row->check()) {
        echo "<script> alert('" . html_entity_decode($row->getError()) . "'); window.history.go(-1); </script>\n";
        exit;
    }
    $pwd = $row->password;
    $salt = mosMakePassword(16);
    $crypt = md5($row->password . $salt);
    $row->password = $crypt . ':' . $salt;
    $row->registerDate = date('Y-m-d H:i:s');
    if (!$row->store()) {
        echo "<script> alert('" . html_entity_decode($row->getError()) . "'); window.history.go(-1); </script>\n";
        exit;
    }
    $row->checkin();
    $name = trim($row->name);
    $email = trim($row->email);
    $username = trim($row->username);
    $subject = sprintf(_SEND_SUB, $name, $mosConfig_sitename);
    $subject = html_entity_decode($subject, ENT_QUOTES);
    if ($mosConfig_useractivation == 1) {
        $message = sprintf(_USEND_MSG_ACTIVATE, $name, $mosConfig_sitename, $mosConfig_live_site . "/index.php?option=com_registration&task=activate&activation=" . $row->activation, $mosConfig_live_site, $username, $pwd);
    } else {
        $message = sprintf(_USEND_MSG, $name, $mosConfig_sitename, $mosConfig_live_site);
    }
    $message = html_entity_decode($message, ENT_QUOTES);
    // check if Global Config `mailfrom` and `fromname` values exist
    if ($mosConfig_mailfrom != '' && $mosConfig_fromname != '') {
        $adminName2 = $mosConfig_fromname;
        $adminEmail2 = $mosConfig_mailfrom;
    } else {
        // use email address and name of first superadmin for use in email sent to user
        $query = "SELECT name, email" . "\n FROM #__users" . "\n WHERE LOWER( usertype ) = 'superadministrator'" . "\n OR LOWER( usertype ) = 'super administrator'";
        $database->setQuery($query);
        $rows = $database->loadObjectList();
        $row2 = $rows[0];
        $adminName2 = $row2->name;
        $adminEmail2 = $row2->email;
    }
    // Send email to user
    mosMail($adminEmail2, $adminName2, $email, $subject, $message);
    // Send notification to all administrators
    $subject2 = sprintf(_SEND_SUB, $name, $mosConfig_sitename);
    $message2 = sprintf(_ASEND_MSG, $adminName2, $mosConfig_sitename, $row->name, $email, $username);
    $subject2 = html_entity_decode($subject2, ENT_QUOTES);
    $message2 = html_entity_decode($message2, ENT_QUOTES);
    // get email addresses of all admins and superadmins set to recieve system emails
    $query = "SELECT email, sendEmail" . "\n FROM #__users" . "\n WHERE ( gid = 24 OR gid = 25 )" . "\n AND sendEmail = 1" . "\n AND block = 0";
    $database->setQuery($query);
    $admins = $database->loadObjectList();
    foreach ($admins as $admin) {
        // send email to admin & super admin set to recieve system emails
        mosMail($adminEmail2, $adminName2, $admin->email, $subject2, $message2);
    }
    if ($mosConfig_useractivation == 1) {
        echo _REG_COMPLETE_ACTIVATE;
    } else {
        echo _REG_COMPLETE;
    }
}
开发者ID:jwest00724,项目名称:Joomla-1.0,代码行数:86,代码来源:registration.php

示例13: edit

    function edit(&$uid, $menutype, $option)
    {
        global $database, $my, $mainframe;
        global $mosConfig_absolute_path;
        $menu = new mosMenu($database);
        $menu->load((int) $uid);
        // fail if checked out not by 'me'
        if ($menu->checked_out && $menu->checked_out != $my->id) {
            mosErrorAlert("The module " . $menu->title . " is currently being edited by another administrator");
        }
        if ($uid) {
            $menu->checkout($my->id);
        } else {
            // load values for new entry
            $menu->type = 'content_item_link';
            $menu->menutype = $menutype;
            $menu->browserNav = 0;
            $menu->ordering = 9999;
            $menu->parent = intval(mosGetParam($_POST, 'parent', 0));
            $menu->published = 1;
        }
        if ($uid) {
            $link = 'javascript:submitbutton( \'redirect\' );';
            $temp = explode('id=', $menu->link);
            $query = "SELECT a.title, c.name AS category, s.name AS section" . "\n FROM #__content AS a" . "\n LEFT JOIN #__categories AS c ON a.catid = c.id" . "\n LEFT JOIN #__sections AS s ON a.sectionid = s.id" . "\n WHERE a.id = " . (int) $temp[1];
            $database->setQuery($query);
            $content = $database->loadObjectlist();
            // outputs item name, category & section instead of the select list
            $lists['content'] = '
			<table width="100%">
			<tr>
				<td width="10%">
				Item:
				</td>
				<td>
				<a href="' . $link . '" title="Edit Content Item">
				' . $content[0]->title . '
				</a>
				</td>
			</tr>
			<tr>
				<td width="10%">
				Category:
				</td>
				<td>
				' . $content[0]->category . '
				</td>
			</tr>
			<tr>
				<td width="10%">
				Section:
				</td>
				<td>
				' . $content[0]->section . '
				</td>
			</tr>
			</table>';
            $contents = '';
            $lists['content'] .= '<input type="hidden" name="content_item_link" value="' . $temp[1] . '" />';
        } else {
            $query = "SELECT a.id AS value," . "\n CONCAT(s.title, ' - ',c.title,' / ',a.title, '&nbsp;&nbsp;&nbsp;&nbsp;') AS text" . "\n FROM #__content AS a" . "\n INNER JOIN #__categories AS c ON a.catid = c.id" . "\n INNER JOIN #__sections AS s ON a.sectionid = s.id AND s.scope = 'content'" . "\n WHERE a.state = 1" . "\n ORDER BY a.sectionid, a.catid, a.title";
            $database->setQuery($query);
            $contents = $database->loadObjectList();
            //	Create a list of links
            $lists['content'] = mosHTML::selectList($contents, 'content_item_link', 'class="inputbox" size="10"', 'value', 'text', '');
        }
        // build html select list for target window
        $lists['target'] = mosAdminMenus::Target($menu);
        // build the html select list for ordering
        $lists['ordering'] = mosAdminMenus::Ordering($menu, $uid);
        // build the html select list for the group access
        $lists['access'] = mosAdminMenus::Access($menu);
        // build the html select list for paraent item
        $lists['parent'] = mosAdminMenus::Parent($menu);
        // build published button option
        $lists['published'] = mosAdminMenus::Published($menu);
        // build the url link output
        $lists['link'] = mosAdminMenus::Link($menu, $uid);
        // get params definitions
        $params = new mosParameters($menu->params, $mainframe->getPath('menu_xml', $menu->type), 'menu');
        content_item_link_menu_html::edit($menu, $lists, $params, $option, $contents);
    }
开发者ID:jwest00724,项目名称:Joomla-1.0,代码行数:82,代码来源:content_item_link.class.php

示例14: changeContact

/**
* Changes the state of one or more content pages
* @param array An array of unique category id numbers
* @param integer 0 if unpublishing, 1 if publishing
* @param string The current option
*/
function changeContact($cid = null, $state = 0, $option)
{
    global $database, $my;
    josSpoofCheck();
    if (!is_array($cid) || count($cid) < 1) {
        $action = $state ? 'publish' : 'unpublish';
        mosErrorAlert("Select an item to {$action}");
    }
    mosArrayToInts($cid);
    $cids = 'id=' . implode(' OR id=', $cid);
    $query = "UPDATE #__contact_details" . "\n SET published = " . (int) $state . "\n WHERE ( {$cids} )" . "\n AND ( checked_out = 0 OR ( checked_out = " . (int) $my->id . ") )";
    $database->setQuery($query);
    if (!$database->query()) {
        echo "<script> alert('" . $database->getErrorMsg() . "'); window.history.go(-1); </script>\n";
        exit;
    }
    if (count($cid) == 1) {
        $row = new mosContact($database);
        $row->checkin(intval($cid[0]));
    }
    mosRedirect("index2.php?option={$option}");
}
开发者ID:jwest00724,项目名称:Joomla-1.0,代码行数:28,代码来源:admin.contact.php

示例15: mosErrorAlert

    if (file_exists($base_Dir . $userfile_name)) {
        mosErrorAlert('A imagem ' . $userfile_name . ' já existe.', $action);
    }
    if (strcasecmp(substr($userfile_name, -4), '.gif') && strcasecmp(substr($userfile_name, -4), '.jpg') && strcasecmp(substr($userfile_name, -4), '.png') && strcasecmp(substr($userfile_name, -4), '.bmp') && strcasecmp(substr($userfile_name, -4), '.doc') && strcasecmp(substr($userfile_name, -4), '.xls') && strcasecmp(substr($userfile_name, -4), '.ppt') && strcasecmp(substr($userfile_name, -4), '.swf') && strcasecmp(substr($userfile_name, -4), '.pdf')) {
        mosErrorAlert('O arquivo deve ser do tipo gif, png, jpg, bmp, swf, doc, xls ou ppt', $action);
    }
    if (eregi('.pdf', $userfile_name) || eregi('.doc', $userfile_name) || eregi('.xls', $userfile_name) || eregi('.ppt', $userfile_name)) {
        if (!move_uploaded_file($_FILES['userfile']['tmp_name'], $media_path . $_FILES['userfile']['name']) || !mosChmod($media_path . $_FILES['userfile']['name'])) {
            mosErrorAlert('O envio do arquivo ' . $userfile_name . ' falhou', $action);
        } else {
            mosErrorAlert('O envio do arquivo ' . $userfile_name . ' para o diretório ' . $base_Dir . ' foi realizado com sucesso', "window.close()");
        }
    } elseif (!move_uploaded_file($_FILES['userfile']['tmp_name'], $base_Dir . $_FILES['userfile']['name']) || !mosChmod($base_Dir . $_FILES['userfile']['name'])) {
        mosErrorAlert('O envio do arquivo ' . $userfile_name . ' falhou', $action);
    } else {
        mosErrorAlert('O envio do arquivo ' . $userfile_name . ' para ' . $base_Dir . ' foi realizado com sucesso', "window.close()");
    }
    echo $base_Dir . $_FILES['userfile']['name'];
}
// css file handling
// check to see if template exists
if ($css != '' && !is_dir($mosConfig_absolute_path . '/administrator/templates/' . $css . '/css/template_css.css')) {
    $css = 'joomla_admin';
} else {
    if ($css == '') {
        $css = 'joomla_admin';
    }
}
$iso = split('=', _ISO);
// xml prolog
echo '<?xml version="1.0" encoding="' . $iso[1] . '"?' . '>';
开发者ID:patricmutwiri,项目名称:joomlaclube,代码行数:31,代码来源:uploadimage.php


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