mambo的cms源代码

源代码在线查看: admin.checkin.php

软件大小: 2053 K
上传用户: bonylee_java
关键词: mambo cms 源代码
下载地址: 免注册下载 普通下载 VIP

相关代码

								/**				* @version $Id: admin.checkin.php,v 1.5 2005/01/06 01:13:16 eddieajau Exp $				* @package Mambo				* @subpackage Checkin				* @copyright (C) 2000 - 2005 Miro International Pty Ltd				* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL				* Mambo is Free Software				*/								/** ensure this file is being included by a parent file */				defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );								if (!$acl->acl_check( 'administration', 'config', 'users', $my->usertype )) {					mosRedirect( 'index2.php', _NOT_AUTH );				}				?>																																																 												$lt = mysql_list_tables($mosConfig_db);				$k = 0;				while (list($tn) = mysql_fetch_array( $lt )) {					// make sure we get the right tables based on prefix					if (!preg_match( "/^".$mosConfig_dbprefix."/i", $tn )) {						continue;					}					$lf = mysql_list_fields($mosConfig_db, "$tn");					$nf = mysql_num_fields($lf);									$foundCO = false;					$foundCOT = false;					$foundE = false;					for ($i = 0; $i < $nf; $i++) {						$fname = mysql_field_name($lf, $i);						if ( $fname == 'checked_out') {							$foundCO = true;						} else if ( $fname == 'checked_out_time') {							$foundCOT = true;						} else if ( $fname == 'editor') {							$foundE = true;						}					}									if ($foundCO && $foundCOT) {						if ($foundE) {							$database->setQuery( "SELECT checked_out, editor FROM $tn WHERE checked_out > 0" );						} else {							$database->setQuery( "SELECT checked_out FROM $tn WHERE checked_out > 0" );						}						$res = $database->query();						$num = $database->getNumRows( $res );										if ($foundE) {							$database->setQuery( "UPDATE $tn SET checked_out=0, checked_out_time='00:00:00', editor=NULL WHERE checked_out > 0" );						} else {							$database->setQuery( "UPDATE $tn SET checked_out=0, checked_out_time='0000-00-00 00:00:00' WHERE checked_out > 0" );						}						$res = $database->query();										if ($res == 1) {							if ($num > 0) {								echo "";								echo "\n	". $adminLanguage->A_COMP_CHECK_TABLE ." - $tn";								echo "\n	". $adminLanguage->A_COMP_CHECK_IN ." $num ". $adminLanguage->A_COMP_ITEMS ."";								echo "\n	";								echo "\n	 ";								echo "\n";							} else {								echo "";								echo "\n	". $adminLanguage->A_COMP_CHECK_TABLE ." - $tn";								echo "\n	". $adminLanguage->A_COMP_CHECK_IN ." $num ". $adminLanguage->A_COMP_ITEMS ."";								echo "\n	 ";								echo "\n	 ";								echo "\n";							}							$k = 1 - $k;						}					}				}				?>																								

相关资源