$value) { echo "\n"; struct_select_menu($dbcon, $counter, $struct[$key]["acat_id"], $selected_id); } } } function change_articledate($article_id=0) { // update article date when content part was changed $article_id = intval($article_id); if($article_id) { $sql = "UPDATE ".DB_PREPEND."phpwcms_article SET "; $sql .= "article_tstamp = NOW() WHERE article_id = '".$article_id."' LIMIT 1 ;"; mysql_query($sql, $GLOBALS['db']); } } function struct_select_list($counter=0, $struct_id=0, & $selected_id) { global $db; $struct_id = intval($struct_id); $counter = intval($counter) + 1; $sql = "SELECT * FROM ".DB_PREPEND."phpwcms_articlecat WHERE acat_trash=0 AND acat_struct=".$struct_id." ORDER BY acat_sort;"; if($result = mysql_query($sql, $db) or die ("error while building struct select menu (ID:".$struct_id)) { $sx=0; while($row = mysql_fetch_assoc($result)) { $struct[$sx] = $row; $sx++; } mysql_free_result($result); } if(isset($struct[0])) { foreach($struct as $key => $value) { echo ''.LF; struct_select_list($counter, $struct[$key]["acat_id"], $selected_id); } } } ?>