| 1 |
<?php |
<?php |
| 2 |
/** |
/** |
| 3 |
* @version $Id: admin.content.php,v 1.3 2005/11/23 23:47:03 counterpoint Exp $ |
* @version $Id: admin.content.php,v 1.24 2005/02/15 14:09:21 kochp Exp $ |
| 4 |
* @package Mambo |
* @package Mambo |
| 5 |
* @subpackage Content |
* @subpackage Content |
| 6 |
* @copyright (C) 2000 - 2005 Miro International Pty Ltd |
* @copyright (C) 2000 - 2005 Miro International Pty Ltd |
| 14 |
require_once( $mainframe->getPath( 'admin_html' ) ); |
require_once( $mainframe->getPath( 'admin_html' ) ); |
| 15 |
|
|
| 16 |
$sectionid = mosGetParam( $_REQUEST, 'sectionid', 0 ); |
$sectionid = mosGetParam( $_REQUEST, 'sectionid', 0 ); |
| 17 |
$id = mosGetParam( $_REQUEST, 'id', 0 ); |
$id = mosGetParam( $_REQUEST, 'id', '' ); |
| 18 |
$cid = mosGetParam( $_POST, 'cid', array(0) ); |
$cid = mosGetParam( $_POST, 'cid', array(0) ); |
| 19 |
if (!is_array( $cid )) { |
if (!is_array( $cid )) { |
| 20 |
$cid = array(0); |
$cid = array(0); |
| 165 |
"c.catid=cc.id", |
"c.catid=cc.id", |
| 166 |
"cc.section=s.id", |
"cc.section=s.id", |
| 167 |
"s.scope='content'", |
"s.scope='content'", |
| 168 |
"c.sectionid=$sectionid" |
"c.sectionid='$sectionid'" |
| 169 |
); |
); |
| 170 |
$order = "\n ORDER BY cc.ordering, cc.title, c.ordering"; |
$order = "\n ORDER BY cc.ordering, cc.title, c.ordering"; |
| 171 |
$all = NULL; |
$all = NULL; |
| 176 |
|
|
| 177 |
// used by filter |
// used by filter |
| 178 |
if ( $filter_sectionid > 0 ) { |
if ( $filter_sectionid > 0 ) { |
| 179 |
$where[] = "c.sectionid = $filter_sectionid"; |
$where[] = "c.sectionid = '$filter_sectionid'"; |
| 180 |
} |
} |
| 181 |
if ( $catid > 0 ) { |
if ( $catid > 0 ) { |
| 182 |
$where[] = "c.catid = $catid"; |
$where[] = "c.catid = '$catid'"; |
| 183 |
} |
} |
| 184 |
if ( $filter_authorid > 0 ) { |
if ( $filter_authorid > 0 ) { |
| 185 |
$where[] = "c.created_by = $filter_authorid"; |
$where[] = "c.created_by = '$filter_authorid'"; |
| 186 |
} |
} |
| 187 |
|
|
| 188 |
if ( $search ) { |
if ( $search ) { |
| 198 |
$pageNav = new mosPageNav( $total, $limitstart, $limit ); |
$pageNav = new mosPageNav( $total, $limitstart, $limit ); |
| 199 |
|
|
| 200 |
$query = "SELECT c.*, g.name AS groupname, cc.name, u.name AS editor, f.content_id AS frontpage, s.title AS section_name, v.name AS author" |
$query = "SELECT c.*, g.name AS groupname, cc.name, u.name AS editor, f.content_id AS frontpage, s.title AS section_name, v.name AS author" |
| 201 |
. "\n FROM #__categories AS cc, #__sections AS s, #__content AS c" |
. "\n FROM #__content AS c, #__categories AS cc, #__sections AS s" |
| 202 |
. "\n LEFT JOIN #__groups AS g ON g.id = c.access" |
. "\n LEFT JOIN #__groups AS g ON g.id = c.access" |
| 203 |
. "\n LEFT JOIN #__users AS u ON u.id = c.checked_out" |
. "\n LEFT JOIN #__users AS u ON u.id = c.checked_out" |
| 204 |
. "\n LEFT JOIN #__users AS v ON v.id = c.created_by" |
. "\n LEFT JOIN #__users AS v ON v.id = c.created_by" |
| 233 |
. "\n FROM #__content AS c" |
. "\n FROM #__content AS c" |
| 234 |
. "\n INNER JOIN #__sections AS s ON s.id = c.sectionid" |
. "\n INNER JOIN #__sections AS s ON s.id = c.sectionid" |
| 235 |
. "\n LEFT JOIN #__users AS u ON u.id = c.created_by" |
. "\n LEFT JOIN #__users AS u ON u.id = c.created_by" |
| 236 |
. "\n WHERE c.state <> -1" |
. "\n WHERE c.state <> '-1'" |
| 237 |
. "\n AND c.state <> -2" |
. "\n AND c.state <> '-2'" |
| 238 |
. "\n GROUP BY u.name" |
. "\n GROUP BY u.name" |
| 239 |
. "\n ORDER BY u.name" |
. "\n ORDER BY u.name" |
| 240 |
; |
; |
| 277 |
"c.catid=cc.id", |
"c.catid=cc.id", |
| 278 |
"cc.section=s.id", |
"cc.section=s.id", |
| 279 |
"s.scope='content'", |
"s.scope='content'", |
| 280 |
"c.sectionid=$sectionid" |
"c.sectionid='$sectionid'" |
| 281 |
); |
); |
| 282 |
$filter = "\n WHERE section = '$sectionid'"; |
$filter = "\n WHERE section = '$sectionid'"; |
| 283 |
$all = NULL; |
$all = NULL; |
| 285 |
|
|
| 286 |
// used by filter |
// used by filter |
| 287 |
if ( $filter_sectionid > 0 ) { |
if ( $filter_sectionid > 0 ) { |
| 288 |
$where[] = "c.sectionid = $filter_sectionid"; |
$where[] = "c.sectionid = '$filter_sectionid'"; |
| 289 |
} |
} |
| 290 |
if ( $filter_authorid > 0 ) { |
if ( $filter_authorid > 0 ) { |
| 291 |
$where[] = "c.created_by = $filter_authorid"; |
$where[] = "c.created_by = '$filter_authorid'"; |
| 292 |
} |
} |
| 293 |
if ($catid > 0) { |
if ($catid > 0) { |
| 294 |
$where[] = "c.catid=$catid"; |
$where[] = "c.catid='$catid'"; |
| 295 |
} |
} |
| 296 |
if ($search) { |
if ($search) { |
| 297 |
$where[] = "LOWER(c.title) LIKE '%$search%'"; |
$where[] = "LOWER(c.title) LIKE '%$search%'"; |
| 309 |
$pageNav = new mosPageNav( $total, $limitstart, $limit ); |
$pageNav = new mosPageNav( $total, $limitstart, $limit ); |
| 310 |
|
|
| 311 |
$query = "SELECT c.*, g.name AS groupname, cc.name, v.name AS author" |
$query = "SELECT c.*, g.name AS groupname, cc.name, v.name AS author" |
| 312 |
. "\n FROM #__categories AS cc, #__sections AS s, #__content AS c" |
. "\n FROM #__content AS c, #__categories AS cc, #__sections AS s" |
| 313 |
. "\n LEFT JOIN #__groups AS g ON g.id = c.access" |
. "\n LEFT JOIN #__groups AS g ON g.id = c.access" |
| 314 |
. "\n LEFT JOIN #__users AS v ON v.id = c.created_by" |
. "\n LEFT JOIN #__users AS v ON v.id = c.created_by" |
| 315 |
. ( count( $where ) ? "\nWHERE " . implode( ' AND ', $where ) : '' ) |
. ( count( $where ) ? "\nWHERE " . implode( ' AND ', $where ) : '' ) |
| 343 |
. "\n FROM #__content AS c" |
. "\n FROM #__content AS c" |
| 344 |
. "\n INNER JOIN #__sections AS s ON s.id = c.sectionid" |
. "\n INNER JOIN #__sections AS s ON s.id = c.sectionid" |
| 345 |
. "\n LEFT JOIN #__users AS u ON u.id = c.created_by" |
. "\n LEFT JOIN #__users AS u ON u.id = c.created_by" |
| 346 |
. "\n WHERE c.state = -1" |
. "\n WHERE c.state = '-1'" |
| 347 |
. "\n GROUP BY u.name" |
. "\n GROUP BY u.name" |
| 348 |
. "\n ORDER BY u.name" |
. "\n ORDER BY u.name" |
| 349 |
; |
; |
| 379 |
if ($row->state < 0) { |
if ($row->state < 0) { |
| 380 |
mosRedirect( 'index2.php?option=com_content§ionid='. $row->sectionid, 'You cannot edit an archived item' ); |
mosRedirect( 'index2.php?option=com_content§ionid='. $row->sectionid, 'You cannot edit an archived item' ); |
| 381 |
} |
} |
|
// fail if checked out not by 'me' |
|
|
if ($row->checked_out AND $row->checked_out <> $my->id) { |
|
|
mosRedirect( 'index2.php?option=com_content', 'The module '. $row->title .' is currently being edited by another administrator' ); |
|
| 382 |
} |
} |
| 383 |
|
|
| 384 |
|
if ( $sectionid == 0 ) { |
| 385 |
|
$where = "\n WHERE section NOT LIKE '%com_%'"; |
| 386 |
|
} else { |
| 387 |
|
$where = "\n WHERE section='$sectionid'"; |
| 388 |
} |
} |
| 389 |
|
|
|
if ( $sectionid == 0 ) $where = "\n WHERE section NOT LIKE '%com_%'"; |
|
|
else $where = "\n WHERE section='$sectionid'"; |
|
|
|
|
| 390 |
// get the type name - which is a special category |
// get the type name - which is a special category |
| 391 |
if ($row->sectionid) $query = "SELECT name FROM #__sections WHERE id=$row->sectionid"; |
if ($row->sectionid){ |
| 392 |
else $query = "SELECT name FROM #__sections WHERE id=$sectionid"; |
$query = "SELECT name FROM #__sections WHERE id=$row->sectionid"; |
| 393 |
$database->setQuery( $query ); |
$database->setQuery( $query ); |
| 394 |
$contentSection = $database->loadResult(); |
$section = $database->loadResult(); |
| 395 |
|
$contentSection = $section; |
| 396 |
|
} else { |
| 397 |
|
$query = "SELECT name FROM #__sections WHERE id=$sectionid"; |
| 398 |
|
$database->setQuery( $query ); |
| 399 |
|
$section = $database->loadResult(); |
| 400 |
|
$contentSection = $section; |
| 401 |
|
} |
| 402 |
|
|
| 403 |
|
// fail if checked out not by 'me' |
| 404 |
|
if ($row->checked_out && $row->checked_out <> $my->id) { |
| 405 |
|
mosRedirect( 'index2.php?option=com_content', 'The module '. $row->title .' is currently being edited by another administrator' ); |
| 406 |
|
} |
| 407 |
|
|
| 408 |
if ($uid) { |
if ($uid) { |
| 409 |
$row->checkout( $my->id ); |
$row->checkout( $my->id ); |
| 464 |
. "\n FROM #__sections AS s" |
. "\n FROM #__sections AS s" |
| 465 |
. "\n ORDER BY s.ordering"; |
. "\n ORDER BY s.ordering"; |
| 466 |
$database->setQuery( $query ); |
$database->setQuery( $query ); |
|
$sections = $database->loadObjectList(); |
|
| 467 |
if ( $sectionid == 0 ) { |
if ( $sectionid == 0 ) { |
| 468 |
array_unshift($sections, mosHTML::makeOption( '-1', 'Select Section' )); |
$sections[] = mosHTML::makeOption( '-1', 'Select Section' ); |
| 469 |
|
$sections = array_merge( $sections, $database->loadObjectList() ); |
| 470 |
$lists['sectionid'] = mosHTML::selectList( $sections, 'sectionid', 'class="inputbox" size="1" '. $javascript, 'value', 'text' ); |
$lists['sectionid'] = mosHTML::selectList( $sections, 'sectionid', 'class="inputbox" size="1" '. $javascript, 'value', 'text' ); |
| 471 |
} else { |
} else { |
| 472 |
$lists['sectionid'] = mosHTML::selectList( $sections, 'sectionid', 'class="inputbox" size="1" '. $javascript, 'value', 'text', intval( $row->sectionid) ); |
$intval = intval( $row->sectionid); |
| 473 |
|
$dbLoadObjectList = $database->loadObjectList(); |
| 474 |
|
$lists['sectionid'] = mosHTML::selectList( $dbLoadObjectList, 'sectionid', 'class="inputbox" size="1" '. $javascript, 'value', 'text', $intval ); |
| 475 |
} |
} |
| 476 |
|
|
| 477 |
|
$sections = $database->loadObjectList(); |
| 478 |
|
|
| 479 |
$sectioncategories = array(); |
$sectioncategories = array(); |
| 480 |
$sectioncategories[-1] = array(); |
$sectioncategories[-1] = array(); |
| 481 |
$sectioncategories[-1][] = mosHTML::makeOption( '-1', 'Select Category' ); |
$sectioncategories[-1][] = mosHTML::makeOption( '-1', 'Select Category' ); |
| 510 |
// build the html select list for ordering |
// build the html select list for ordering |
| 511 |
$query = "SELECT ordering AS value, title AS text" |
$query = "SELECT ordering AS value, title AS text" |
| 512 |
. "\n FROM #__content" |
. "\n FROM #__content" |
| 513 |
. "\n WHERE catid=$row->catid" |
. "\n WHERE catid='$row->catid'" |
| 514 |
. "\n AND state >= 0" |
. "\n AND state >= 0" |
| 515 |
. "\n ORDER BY ordering" |
. "\n ORDER BY ordering" |
| 516 |
; |
; |
| 574 |
$isNew = ( $row->id < 1 ); |
$isNew = ( $row->id < 1 ); |
| 575 |
if ($isNew) { |
if ($isNew) { |
| 576 |
//$row->created = $row->created ? $row->created : date( "Y-m-d H:i:s" ); |
//$row->created = $row->created ? $row->created : date( "Y-m-d H:i:s" ); |
| 577 |
$row->created = $row->created ? mosFormatDate( $row->created, '%Y-%m-%d %H:%M:%S', -$mosConfig_offset) : date( 'Y-m-d H:i:s' ); |
$row->created = $row->created ? mosFormatDate( $row->created, '%Y-%m-%d %H:%M:%S', -$mosConfig_offset * 60 * 60 ) : date( "Y-m-d H:i:s" ); |
| 578 |
$row->created_by = $row->created_by ? $row->created_by : $my->id; |
$row->created_by = $row->created_by ? $row->created_by : $my->id; |
| 579 |
} else { |
} else { |
| 580 |
$row->modified = date('Y-m-d H:i:s'); |
$row->modified = date( "Y-m-d H:i:s" ); |
| 581 |
$row->modified_by = $my->id; |
$row->modified_by = $my->id; |
| 582 |
//$row->created = $row->created ? $row->created : date( "Y-m-d H:i:s" ); |
//$row->created = $row->created ? $row->created : date( "Y-m-d H:i:s" ); |
| 583 |
$row->created = $row->created ? mosFormatDate( $row->created, '%Y-%m-%d %H:%M:%S', -$mosConfig_offset ) : date( 'Y-m-d H:i:s' ); |
$row->created = $row->created ? mosFormatDate( $row->created, '%Y-%m-%d %H:%M:%S', -$mosConfig_offset ) : date( "Y-m-d H:i:s" ); |
| 584 |
$row->created_by = $row->created_by ? $row->created_by : $my->id; |
$row->created_by = $row->created_by ? $row->created_by : $my->id; |
| 585 |
} |
} |
| 586 |
|
|
| 634 |
// toggles go to first place |
// toggles go to first place |
| 635 |
if (!$fp->load( $row->id )) { |
if (!$fp->load( $row->id )) { |
| 636 |
// new entry |
// new entry |
| 637 |
$database->setQuery( "INSERT INTO #__content_frontpage VALUES ($row->id,1)" ); |
$database->setQuery( "INSERT INTO #__content_frontpage VALUES ('$row->id','1')" ); |
| 638 |
if (!$database->query()) { |
if (!$database->query()) { |
| 639 |
echo "<script> alert('".$database->stderr()."');</script>\n"; |
echo "<script> alert('".$database->stderr()."');</script>\n"; |
| 640 |
exit(); |
exit(); |
| 651 |
$fp->updateOrder(); |
$fp->updateOrder(); |
| 652 |
|
|
| 653 |
$row->checkin(); |
$row->checkin(); |
| 654 |
$row->updateOrder( "catid=$row->catid AND state >= 0" ); |
$row->updateOrder( "catid='$row->catid' AND state >= 0" ); |
| 655 |
|
|
| 656 |
$redirect = mosGetParam( $_POST, 'redirect', $sectionid ); |
$redirect = mosGetParam( $_POST, 'redirect', $sectionid ); |
| 657 |
switch ( $task ) { |
switch ( $task ) { |
| 704 |
$total = count ( $cid ); |
$total = count ( $cid ); |
| 705 |
$cids = implode( ',', $cid ); |
$cids = implode( ',', $cid ); |
| 706 |
|
|
| 707 |
$database->setQuery( "UPDATE #__content SET state=$state" |
$database->setQuery( "UPDATE #__content SET state='$state'" |
| 708 |
. "\nWHERE id IN ($cids) AND (checked_out=0 OR checked_out=$my->id)" |
. "\nWHERE id IN ($cids) AND (checked_out=0 OR (checked_out='".$my->id."'))" |
| 709 |
); |
); |
| 710 |
if (!$database->query()) { |
if (!$database->query()) { |
| 711 |
echo "<script> alert('".$database->getErrorMsg()."'); window.history.go(-1); </script>\n"; |
echo "<script> alert('".$database->getErrorMsg()."'); window.history.go(-1); </script>\n"; |
| 745 |
* @param string The name of the current user |
* @param string The name of the current user |
| 746 |
*/ |
*/ |
| 747 |
function toggleFrontPage( $cid, $section, $option ) { |
function toggleFrontPage( $cid, $section, $option ) { |
| 748 |
global $database, $mainframe; |
global $database, $my, $mainframe; |
| 749 |
|
|
| 750 |
if (count( $cid ) < 1) { |
if (count( $cid ) < 1) { |
| 751 |
echo "<script> alert('Select an item to toggle'); window.history.go(-1);</script>\n"; |
echo "<script> alert('Select an item to toggle'); window.history.go(-1);</script>\n"; |
| 765 |
$fp->ordering = 0; |
$fp->ordering = 0; |
| 766 |
} else { |
} else { |
| 767 |
// new entry |
// new entry |
| 768 |
$database->setQuery( "INSERT INTO #__content_frontpage VALUES ($id,0)" ); |
$database->setQuery( "INSERT INTO #__content_frontpage VALUES ('$id','0')" ); |
| 769 |
if (!$database->query()) { |
if (!$database->query()) { |
| 770 |
echo "<script> alert('".$database->stderr()."');</script>\n"; |
echo "<script> alert('".$database->stderr()."');</script>\n"; |
| 771 |
exit(); |
exit(); |
| 779 |
} |
} |
| 780 |
|
|
| 781 |
function removeContent( &$cid, $sectionid, $option ) { |
function removeContent( &$cid, $sectionid, $option ) { |
| 782 |
global $database; |
global $database, $mainframe; |
| 783 |
|
|
| 784 |
$total = count( $cid ); |
$total = count( $cid ); |
| 785 |
if ( $total < 1) { |
if ( $total < 1) { |
| 791 |
$ordering = '0'; |
$ordering = '0'; |
| 792 |
//seperate contentids |
//seperate contentids |
| 793 |
$cids = implode( ',', $cid ); |
$cids = implode( ',', $cid ); |
| 794 |
$query = "UPDATE #__content SET state = $state, ordering = $ordering " |
$query = "UPDATE #__content SET state = '". $state ."', ordering = '". $ordering ."'" |
| 795 |
. "\n WHERE id IN ( ". $cids ." )" |
. "\n WHERE id IN ( ". $cids ." )" |
| 796 |
; |
; |
| 797 |
$database->setQuery( $query ); |
$database->setQuery( $query ); |
| 828 |
|
|
| 829 |
$row = new mosContent( $database ); |
$row = new mosContent( $database ); |
| 830 |
$row->load( $uid ); |
$row->load( $uid ); |
| 831 |
$row->move( $inc, "catid=$row->catid AND state >= 0" ); |
$row->move( $inc, "catid='$row->catid' AND state >= 0" ); |
| 832 |
|
|
| 833 |
$redirect = mosGetParam( $_POST, 'redirect', $row->sectionid ); |
$redirect = mosGetParam( $_POST, 'redirect', $row->sectionid ); |
| 834 |
|
|
| 851 |
// Content Items query |
// Content Items query |
| 852 |
$query = "SELECT a.title" |
$query = "SELECT a.title" |
| 853 |
. "\n FROM #__content AS a" |
. "\n FROM #__content AS a" |
| 854 |
. "\n WHERE a.id IN ($cids) " |
. "\n WHERE ( a.id IN (". $cids .") )" |
| 855 |
. "\n ORDER BY a.title" |
. "\n ORDER BY a.title" |
| 856 |
; |
; |
| 857 |
$database->setQuery( $query ); |
$database->setQuery( $query ); |
| 887 |
// find section name |
// find section name |
| 888 |
$query = "SELECT a.name" |
$query = "SELECT a.name" |
| 889 |
. "\n FROM #__sections AS a" |
. "\n FROM #__sections AS a" |
| 890 |
. "\n WHERE a.id = $newsect" |
. "\n WHERE a.id = ". $newsect ."" |
| 891 |
; |
; |
| 892 |
$database->setQuery( $query ); |
$database->setQuery( $query ); |
| 893 |
$section = $database->loadResult(); |
$section = $database->loadResult(); |
| 895 |
// find category name |
// find category name |
| 896 |
$query = "SELECT a.name" |
$query = "SELECT a.name" |
| 897 |
. "\n FROM #__categories AS a" |
. "\n FROM #__categories AS a" |
| 898 |
. "\n WHERE a.id = $newcat" |
. "\n WHERE a.id = ". $newcat ."" |
| 899 |
; |
; |
| 900 |
$database->setQuery( $query ); |
$database->setQuery( $query ); |
| 901 |
$category = $database->loadResult(); |
$category = $database->loadResult(); |
| 909 |
$row->load( intval( $id ) ); |
$row->load( intval( $id ) ); |
| 910 |
$row->ordering = 0; |
$row->ordering = 0; |
| 911 |
$row->store(); |
$row->store(); |
| 912 |
$row->updateOrder( "catid=$row->catid AND state >= 0" ); |
$row->updateOrder( "catid='$row->catid' AND state >= 0" ); |
| 913 |
} |
} |
| 914 |
|
|
| 915 |
$query = "UPDATE #__content SET sectionid = $newsect, catid=$newcat" |
$query = "UPDATE #__content SET sectionid = '". $newsect ."', catid='". $newcat ."'" |
| 916 |
. "\n WHERE id IN ($cids)" |
. "\n WHERE id IN ($cids)" |
| 917 |
. "\n AND (checked_out=0 OR checked_out=$my->id)" |
. "\n AND ( checked_out='0' OR ( checked_out='". $my->id ."') )" |
| 918 |
; |
; |
| 919 |
$database->setQuery( $query ); |
$database->setQuery( $query ); |
| 920 |
if ( !$database->query() ) { |
if ( !$database->query() ) { |
| 927 |
$row->load( intval( $id ) ); |
$row->load( intval( $id ) ); |
| 928 |
$row->ordering = 0; |
$row->ordering = 0; |
| 929 |
$row->store(); |
$row->store(); |
| 930 |
$row->updateOrder( "catid=$row->catid AND state >= 0" ); |
$row->updateOrder( "catid='". $row->catid ."' AND state >= 0" ); |
| 931 |
} |
} |
| 932 |
|
|
| 933 |
$msg = $total. ' Item(s) successfully moved to Section: '. $section .', Category: '. $category; |
$msg = $total. ' Item(s) successfully moved to Section: '. $section .', Category: '. $category; |
| 951 |
## Content Items query |
## Content Items query |
| 952 |
$query = "SELECT a.title" |
$query = "SELECT a.title" |
| 953 |
. "\n FROM #__content AS a" |
. "\n FROM #__content AS a" |
| 954 |
. "\n WHERE a.id IN ($cids) " |
. "\n WHERE ( a.id IN (". $cids .") )" |
| 955 |
. "\n ORDER BY a.title" |
. "\n ORDER BY a.title" |
| 956 |
; |
; |
| 957 |
$database->setQuery( $query ); |
$database->setQuery( $query ); |
| 977 |
* saves Copies of items |
* saves Copies of items |
| 978 |
**/ |
**/ |
| 979 |
function copyItemSave( $cid, $sectionid, $option ) { |
function copyItemSave( $cid, $sectionid, $option ) { |
| 980 |
global $database; |
global $database, $my; |
| 981 |
|
|
| 982 |
$sectcat = mosGetParam( $_POST, 'sectcat', '' ); |
$sectcat = mosGetParam( $_POST, 'sectcat', '' ); |
| 983 |
//seperate sections and categories from selection |
//seperate sections and categories from selection |
| 1034 |
$row->modified_by = $item[0]->modified_by; |
$row->modified_by = $item[0]->modified_by; |
| 1035 |
$row->checked_out = $item[0]->checked_out; |
$row->checked_out = $item[0]->checked_out; |
| 1036 |
$row->checked_out_time = $item[0]->checked_out_time; |
$row->checked_out_time = $item[0]->checked_out_time; |
| 1037 |
|
$row->frontpage_up = $item[0]->frontpage_up; |
| 1038 |
|
$row->frontpage_down = $item[0]->frontpage_down; |
| 1039 |
$row->publish_up = $item[0]->publish_up; |
$row->publish_up = $item[0]->publish_up; |
| 1040 |
$row->publish_down = $item[0]->publish_down; |
$row->publish_down = $item[0]->publish_down; |
| 1041 |
$row->images = $item[0]->images; |
$row->images = $item[0]->images; |
| 1070 |
|
|
| 1071 |
$row = new mosContent($database); |
$row = new mosContent($database); |
| 1072 |
$row->Load($id); |
$row->Load($id); |
| 1073 |
$row->hits = 0; |
$row->hits = "0"; |
| 1074 |
$row->store(); |
$row->store(); |
| 1075 |
$row->checkin(); |
$row->checkin(); |
| 1076 |
|
|
| 1138 |
exit(); |
exit(); |
| 1139 |
} |
} |
| 1140 |
$row->checkin(); |
$row->checkin(); |
| 1141 |
$row->updateOrder( "menutype='$row->menutype' AND parent=$row->parent" ); |
$row->updateOrder( "menutype='$row->menutype' AND parent='$row->parent'" ); |
| 1142 |
|
|
| 1143 |
$msg = $link .' (Link - Static Content) in menu: '. $menu .' successfully created'; |
$msg = $link .' (Link - Static Content) in menu: '. $menu .' successfully created'; |
| 1144 |
mosRedirect( 'index2.php?option=com_content§ionid='. $redirect .'&task=edit&hidemainmenu=1&id='. $id, $msg ); |
mosRedirect( 'index2.php?option=com_content§ionid='. $redirect .'&task=edit&hidemainmenu=1&id='. $id, $msg ); |
| 1177 |
exit(); |
exit(); |
| 1178 |
} // if |
} // if |
| 1179 |
// remember to updateOrder this group |
// remember to updateOrder this group |
| 1180 |
$condition = "catid=$row->catid AND state>=0"; |
$condition = "catid='$row->catid' AND state>=0"; |
| 1181 |
$found = false; |
$found = false; |
| 1182 |
foreach ( $conditions as $cond ) |
foreach ( $conditions as $cond ) |
| 1183 |
if ($cond[1]==$condition) { |
if ($cond[1]==$condition) { |