Example #1
0
/**
* Compiles a list of the items you have selected to Copy
*/
function copyConfirm($option, $cid)
{
    global $database;
    $cids = implode(',', $cid);
    $query = "SELECT a.id, a.module, a.title, a.params FROM #__modules AS a WHERE a.id IN ( " . $cids . " )";
    $database->setQuery($query);
    $module = $database->loadObjectList();
    $params = mosParseParams($module[0]->params);
    // adds menutype to array
    $type = trim(@$params->menutype);
    // Content Items query
    $query = "SELECT a.name, a.id" . "\n FROM #__menu AS a" . "\n WHERE ( a.menutype IN ( '" . $type . "' ) )" . "\n ORDER BY a.name";
    $database->setQuery($query);
    $items = $database->loadObjectList();
    HTML_menumanager::showCopy($option, $cid, $type, $items);
}
/**
* Compiles a list of the items you have selected to Copy
*/
function copyConfirm($option, $type)
{
    global $database;
    // Content Items query
    $query = "SELECT a.name, a.id" . "\n FROM #__menu AS a" . "\n WHERE a.menutype = " . $database->Quote($type) . "\n ORDER BY a.name";
    $database->setQuery($query);
    $items = $database->loadObjectList();
    HTML_menumanager::showCopy($option, $type, $items);
}