コード例 #1
0
ファイル: index.php プロジェクト: GrottoCenter/GrottoCenter
 * GrottoCenter is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with GrottoCenter.  If not, see <http://www.gnu.org/licenses/>.
 *
 * @copyright Copyright (c) 2009-2012 Clement Ronzon
 * @license http://www.gnu.org/licenses/agpl.txt
 */
include "conf/config.php";
include "func/function.php";
include "html/declaration.php";
$refreshCache = false;
if (allowAccess(cache_refresh_all)) {
    $refreshCache = isset($_GET['refreshCache']) ? $_GET['refreshCache'] == "True" : false;
}
if ($_SESSION['Application_host'] == 'localhost') {
    $refreshCache = true;
}
if ($refreshCache) {
    if (file_exists("func/genScriptJS.php")) {
        include "func/genScriptJS.php";
    }
    resetConvertedFiles($ConvertedFilesArray);
    $langArray = getAvailableLanguages();
    foreach ($langArray as $shortLang => $largeLang) {
        convertFiles($shortLang, $ConvertedFilesArray);
    }
    //Refresh the JS cache
コード例 #2
0
ファイル: export.php プロジェクト: GrottoCenter/GrottoCenter
 *
 * GrottoCenter is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with GrottoCenter.  If not, see <http://www.gnu.org/licenses/>.
 *
 * @copyright Copyright (c) 2009-2012 Clément Ronzon
 * @license http://www.gnu.org/licenses/agpl.txt
 */
include "../conf/config.php";
include "../func/function.php";
include "declaration.php";
if (!allowAccess(entry_export_all)) {
    exit;
}
$frame = "filter";
$list = "";
$arrList = array();
$params = "";
$file_name = "";
$file_format = "";
if (isset($_POST['save'])) {
    $list = isset($_POST['e_list']) ? $_POST['e_list'] : '';
    $file_name = isset($_POST['file_name']) ? $_POST['file_name'] : '';
    $file_format = isset($_POST['file_format']) ? $_POST['file_format'] : '';
    if ($list != "") {
        $arrList = split('[|]+', $list);
    }
コード例 #3
0
ファイル: filter.php プロジェクト: GrottoCenter/GrottoCenter
    ?>
		    <li class ="sub_menu li_login">
          <a href="connection_<?php 
    echo $_SESSION['language'];
    ?>
.php?type=login" target="filter"><convert>#label=4<convert><!--Connexion--></a>
        </li>
        <li class ="sub_menu li_register">
          <a href="connection_<?php 
    echo $_SESSION['language'];
    ?>
.php?type=new" target="filter"><convert>#label=379<convert><!--Inscription--></a>
        </li>
<?php 
}
if (allowAccess(appli_view_all)) {
    ?>
        <li class ="sub_menu li_admin">
          <a href="administration_<?php 
    echo $_SESSION['language'];
    ?>
.php?type=menu" target="filter" style="color:red;"><convert>#label=380<convert><!--Panneau d'administration--></a>
        </li>
<?php 
}
?>
      </ul>
<?php 
//####################### Deprecated ###########################################
if ($_SESSION['home_page'] == "home" && USER_IS_CONNECTED && false) {
    ?>
コード例 #4
0
        ?>
, <a href="JavaScript:grottoNew();"><convert>#label=435<convert><!--créez le--></a> !
            <?php 
        echo getBotBubble();
        ?>
          </div>
        </td></tr>
<?php 
        //}
        ?>
      </table>
    </form>
<?php 
        break;
    case "delete":
        if (!allowAccess(caver_delete_himself)) {
            exit;
        }
        if (!isset($_POST['delete_user']) || $delete_failed) {
            ?>
    deleteBeforeLoad(true);
    <?php 
            echo getCDataTag(false);
            ?>
    </script>
  </head>
  <body onload="JavaScript:deleteOnLoad(true);">
    <?php 
            echo getTopFrame();
            ?>
    <?php 
コード例 #5
0
ファイル: comprofiler.php プロジェクト: rkern21/videoeditor
function reportUser($option,$form=1,$uid=0) {
	global $_CB_framework, $_CB_database, $ueConfig, $Itemid, $_POST;

	if($ueConfig['allowUserReports']==0) {
			echo _UE_FUNCTIONALITY_DISABLED;
			exit();
	}
	if (!allowAccess( $ueConfig['allow_profileviewbyGID'],'RECURSE', userGID( $_CB_framework->myId() ))) {
		echo _UE_NOT_AUTHORIZED;
		return;
	}
	if($form==1) {
		HTML_comprofiler::reportUserForm($option,$uid);
	} else {
		// simple spoof check security
		cbSpoofCheck( 'reportUserForm' );

		$row = new moscomprofilerUserReport( $_CB_database );

		if (!$row->bind( $_POST )) {
			cbRedirect( cbSef("index.php?option=$option&amp;task=reportUser".($Itemid ? "&amp;Itemid=". (int) $Itemid : ""), false ), $row->getError(), 'error' );
			return;
		}

		_cbMakeHtmlSafe($row);			//TBD: remove this: not urgent but isn't right

		$row->reportedondate = date("Y-m-d H:i:s");

		if (!$row->check()) {
			cbRedirect( cbSef("index.php?option=$option&amp;task=reportUser".($Itemid ? "&amp;Itemid=". (int) $Itemid : ""), false ), $row->getError(), 'error' );
			return;
		}

		if (!$row->store()) {
			cbRedirect( cbSef("index.php?option=$option&amp;task=reportUser".($Itemid ? "&amp;Itemid=". (int) $Itemid : ""), false ), $row->getError(), 'error' );
			return;
		}
		if($ueConfig['moderatorEmail']==1) {
			$cbNotification = new cbNotification();
			$cbNotification->sendToModerators(_UE_USERREPORT_SUB,_UE_USERREPORT_MSG);
		}
		echo _UE_USERREPORT_SUCCESSFUL;
	}
}
コード例 #6
0
ファイル: cave.php プロジェクト: GrottoCenter/GrottoCenter
</div>
    	  </td></tr><tr><td class="field">
    	    <input type="hidden" id="delete_id" name="delete_id" value="<?php 
        echo $did;
        ?>
" />
          <input type="submit" class="button1" id="delete" name="delete" value="<convert>#label=55<convert>" /><!--Supprimer-->
        </td></tr><tr><td class="field">
          <input class="button1" type="button" id="cancel" name="cancel" value="<convert>#label=77<convert>" onclick="JavaScript:newCancel();" /><!--Annuler-->
        </td></tr>
      </table>
    </form>
<?php 
        break;
    case "edit":
        if (!allowAccess(cave_edit_all)) {
            exit;
        }
        if ($locked) {
        } else {
            if (!isset($_POST['save']) || $save_failed) {
                ?>
    newBeforeLoad(true);
    <?php 
                echo getCDataTag(false);
                ?>
    </script>
  </head>
  <body onbeforeunload="JavaScript:newOnBeforeUnload(event);"  onunload="JavaScript:newOnUnload(true);" onload="JavaScript:newOnLoad(true);">
    <?php 
                echo getTopFrame();
コード例 #7
0
ファイル: entry.php プロジェクト: GrottoCenter/GrottoCenter
</div>
  		  </td></tr><tr><td class="field">
  		    <input type="hidden" id="delete_id" name="delete_id" value="<?php 
        echo $did;
        ?>
" />
          <input type="submit" class="button1" id="delete" name="delete" value="<convert>#label=55<convert>" /><!--Supprimer-->
        </td></tr><tr><td class="field">
          <input class="button1" type="button" id="cancel" name="cancel" value="<convert>#label=77<convert>" onclick="JavaScript:newCancel();" /><!--Annuler-->
        </td></tr>
      </table>
    </form>
<?php 
        break;
    case "edit":
        if (!allowAccess(entry_edit_all)) {
            exit;
        }
        if ($locked) {
        } else {
            if (!isset($_POST['save']) || $save_failed) {
                include "properties_" . $_SESSION['language'] . ".php";
                ?>
    newBeforeLoad(true);
    <?php 
                echo getCDataTag(false);
                ?>
    </script>
  </head>
  <body onbeforeunload="JavaScript:newOnBeforeUnload(event);"  onunload="JavaScript:newOnUnload(true);" onload="JavaScript:newOnLoad(true);">
    <?php 
コード例 #8
0
function userProfile($option, $uid, $submitvalue)
{
    global $_REQUEST, $ueConfig, $_CB_framework, $_PLUGINS;
    if (isset($_REQUEST['user'])) {
        if (!CBuser::getMyInstance()->authoriseView('profile', $uid)) {
            if ($_CB_framework->myId() < 1 && !($_CB_framework->getCfg('allowUserRegistration') == '0' && (!isset($ueConfig['reg_admin_allowcbregistration']) || $ueConfig['reg_admin_allowcbregistration'] != '1')) && allowAccess($ueConfig['allow_profileviewbyGID'], 'RECURSE', $_CB_framework->acl->get_group_id('Registered', 'ARO'))) {
                echo _UE_REGISTERFORPROFILEVIEW;
            } else {
                echo _UE_NOT_AUTHORIZED;
            }
            return;
        }
    } else {
        if ($uid == 0) {
            echo _UE_REGISTERFORPROFILE;
            return;
        }
    }
    $user =& loadComprofilerUser($uid);
    if ($user === null) {
        echo _UE_NOSUCHPROFILE;
        return;
    }
    if (cbGetParam($_GET, 'reason') == 'canceledit') {
        if ($uid == 0) {
            $Euid = $_CB_framework->myId();
        } else {
            $Euid = $uid;
        }
        $msg = cbCheckIfUserCanPerformUserTask($Euid, 'allowModeratorsUserEdit');
        if ($Euid != $_CB_framework->myId() && $msg === null) {
            // safeguard against missconfiguration of the above: also avoids lower-level users editing higher level ones:
            $msg = checkCBpermissions(array((int) $Euid), 'edit', true);
        }
        if ($msg) {
            echo $msg;
            return;
        }
        $_PLUGINS->loadPluginGroup('user');
        $results = $_PLUGINS->trigger('onAfterUserProfileEditCancel', array(&$user));
        if ($_PLUGINS->is_errors()) {
            echo "<script type=\"text/javascript\">alert(\"" . $_PLUGINS->getErrorMSG() . "\"); window.history.go(-1); </script>\n";
            exit;
        }
    }
    HTML_comprofiler::userProfile($user, $option, $submitvalue);
}
コード例 #9
0
ファイル: cb.lists.php プロジェクト: rkern21/videoeditor
	function drawUsersList( $uid, $listid, $searchFormValuesRAW ) {
		global $_CB_database, $_CB_framework, $ueConfig, $Itemid, $_PLUGINS;
	
		$search					=	null;
		$searchGET				=	cbGetParam( $searchFormValuesRAW, 'search' );
		$limitstart				=	(int) cbGetParam( $searchFormValuesRAW, 'limitstart', 0 );
		$searchmode				=	(int) cbGetParam( $searchFormValuesRAW, 'searchmode', 0 );
		$randomParam			=	(int) cbGetParam( $searchFormValuesRAW, 'rand', 0 );
	
		// old search on formated name:
	
	/*	if ( $searchPOST || count( $_POST ) ) {
			// simple spoof check security
			cbSpoofCheck( 'usersList' );
			if ( cbGetParam( $searchFormValuesRAW, "action" ) == "search" ) {
				$search			=	$searchPOST;
			}
		} else
			if ( isset( $searchFormValuesRAW['limitstart'] ) ) {
				$search				=	stripslashes( $searchGET );
			}
	*/
		// get my user and gets the list of user lists he is allowed to see (ACL):
	
		$myCbUser				=&	CBuser::getInstance( $uid );
		if ( $myCbUser === null ) {
			$myCbUser			=&	CBuser::getInstance( null );
		}
		$myUser					=&	$myCbUser->getUserData();
	/*
		$myUser					=	new moscomprofilerUser( $_CB_database );
		if ( $uid ) {
			$myUser->load( (int) $uid );
		}
	*/
		$useraccessgroupSQL		=	" AND useraccessgroupid IN (".implode(',',getChildGIDS(userGID($uid))).")";
		$_CB_database->setQuery( "SELECT listid, title FROM #__comprofiler_lists WHERE published=1" . $useraccessgroupSQL . " ORDER BY ordering" );
		$plists					=	$_CB_database->loadObjectList();
		$lists					=	array();
		$publishedlists			=	array();
	
		for ( $i=0, $n=count( $plists ); $i < $n; $i++ ) {
			$plist				=&	$plists[$i];
			$listTitleNoHtml	=	strip_tags( cbReplaceVars( getLangDefinition( $plist->title ), $myUser, false, false ) );
		   	$publishedlists[]	=	moscomprofilerHTML::makeOption( $plist->listid, $listTitleNoHtml );
		}
	
		// select either list selected or default list to which he has access (ACL):
	
		if ( $listid == 0 ) {
			$_CB_database->setQuery( "SELECT listid FROM #__comprofiler_lists "
			. "\n WHERE `default`=1 AND published=1" . $useraccessgroupSQL );
			$listid				=	(int) $_CB_database->loadresult();
			if ( $listid == 0 && ( count( $plists ) > 0 ) ) {
				$listid			=	(int) $plists[0]->listid;
			}
		}
		if ( ! ( $listid > 0 ) ) {
			echo _UE_NOLISTFOUND;
			return;
		}
	
		// generates the drop-down list of lists:
	
		if ( count( $plists ) > 1 ) {
			$lists['plists']	=	moscomprofilerHTML::selectList( $publishedlists, 'listid', 'class="inputbox" size="1" onchange="this.form.submit();"', 'value', 'text', $listid, 1 );
		}
	
		// loads the list record:
	
		$row					=	new moscomprofilerLists( $_CB_database );
		if ( ( ! $row->load( (int) $listid ) ) || ( $row->published != 1 ) ) {
			echo _UE_LIST_DOES_NOT_EXIST;
			return;
		}
		if ( ! allowAccess( $row->useraccessgroupid,'RECURSE', userGID($uid) ) ) {
			echo _UE_NOT_AUTHORIZED;
			return;
		}
	
		$params					=	new cbParamsBase( $row->params );
	
		$hotlink_protection		=	$params->get( 'hotlink_protection', 0 );
		if ( $hotlink_protection == 1 ) {
			if ( ( $searchGET !== null ) || $limitstart ) {
				cbSpoofCheck( 'usersList', 'GET' );
			}
		}
	
		$limit					=	(int) $params->get( 'list_limit' );
		if ( $limit == 0 ) {
			$limit				=	(int) $ueConfig['num_per_page'];
		}
	
		$showPaging				=	$params->get( 'list_paging', 1 );
		if ( $showPaging != 1 ) {
			$limitstart			=	0;
		}
	
		$isModerator			=	isModerator( $_CB_framework->myId() );
	
		$_PLUGINS->loadPluginGroup( 'user' );
		// $plugSearchFieldsArray	=	$_PLUGINS->trigger( 'onStartUsersList', array( &$listid, &$row, &$search, &$limitstart, &$limit ) );
		$_PLUGINS->trigger( 'onStartUsersList', array( &$listid, &$row, &$search, &$limitstart, &$limit ) );
	
		// handles the users allowed to be listed in the list by ACL:
	
		$allusergids			=	array();
		$usergids				=	explode( ',', $row->usergroupids );
	/*	This was a bug tending to list admins when "public backend" was checked, and all frontend users when "public backend was checked. Now just ignore them:
		foreach( $usergids AS $usergid ) {
			$allusergids[]		=	$usergid;
			if ($usergid==29 || $usergid==30) {
				$groupchildren	=	array();
				$groupchildren	=	$_CB_framework->acl->get_group_children( $usergid, 'ARO','RECURSE' );
				$allusergids	=	array_merge($allusergids,$groupchildren);
			}
		}
	*/
		$allusergids			=	array_diff( $usergids, array( 29, 30 ) );
		$usergids				=	implode( ",", $allusergids );
	
		// build SQL Select query:
	
		$random					=	0;
		if( $row->sortfields != '' ) {
			$matches			=	null;
			if ( preg_match( '/^RAND\(\)\s(ASC|DESC)$/', $row->sortfields, $matches ) ) {
				// random sorting needs to have same seed on pages > 1 to not have probability to show same users:
				if ( $limitstart ) {
					$random		=	(int) $randomParam;
				}
				if ( ! $random ) {
					$random		=	rand( 0, 32767 );
				}
				$row->sortfields =	'RAND(' . (int) $random . ') ' . $matches[1];
			}
			$orderby			=	"\n ORDER BY " . $row->sortfields;
		}
		$filterby				=	'';
		if ( $row->filterfields != '' ) {
			$filterRules		=	utf8RawUrlDecode( substr( $row->filterfields, 1 ) );
	
			if ( $_CB_framework->myId() ) {
				$user			=	new moscomprofilerUser( $_CB_database );
				if ( $user->load( (int) $_CB_framework->myId() ) ) {
					$filterRules	=	cbReplaceVars( $filterRules, $user, array( $_CB_database, 'getEscaped' ), false, array() );
				}
			}
			$filterby			=	" AND ". $filterRules;
		}
	
		// Prepare part after SELECT .... " and before "FROM" :
	
		$tableReferences		=	array( '#__comprofiler' => 'ue', '#__users' => 'u' );
	
		// Fetch all fields:
	
		$tabs					=	$myCbUser->_getCbTabs();		//	new cbTabs( 0, 1 );		//TBD: later: this private method should not be called here, but the whole users-list should go into there and be called here.
	
		$allFields				=	$tabs->_getTabFieldsDb( null, $myUser, 'list' );
		// $_CB_database->setQuery( "SELECT * FROM #__comprofiler_fields WHERE published = 1" );
		// $allFields				=	$_CB_database->loadObjectList( 'fieldid', 'moscomprofilerFields', array( &$_CB_database ) );
	
	
		//Make columns array. This array will later be constructed from the tabs table:
	
		$columns				=	array();
	
		for ( $i = 1; $i < 50; ++$i ) {
			$enabledVar			=	"col".$i."enabled";
	
			if ( ! isset( $row->$enabledVar ) ) {
				break;
			}
			$titleVar			=	"col".$i."title";
			$fieldsVar			=	"col".$i."fields";
			$captionsVar		=	"col".$i."captions";
	
			if ( $row->$enabledVar == 1 ) {
				$col			=	new stdClass();
				$col->fields	=	( $row->$fieldsVar ? explode( '|*|', $row->$fieldsVar ) : array() );
				$col->title		=	$row->$titleVar;
				$col->titleRendered		=	$myCbUser->replaceUserVars( $col->title );
				$col->captions	=	$row->$captionsVar;
				// $col->sort	=	1; //All columns can be sorted
				$columns[$i]	=	$col;
			}
		}
	
		// build fields and tables accesses, also check for searchable fields:
	
		$searchableFields		=	array();
		$fieldsSQL				=	cbUsersList::getFieldsSQL( $columns, $allFields, $tableReferences, $searchableFields, $params );
	
		$_PLUGINS->trigger( 'onAfterUsersListFieldsSql', array( &$columns, &$allFields, &$tableReferences ) );
	
		$tablesSQL				=	array();
		$joinsSQL				=	array();
		$tablesWhereSQL			=	array(	'block'		=>	'u.block = 0',
											'approved'	=>	'ue.approved = 1',
											'confirmed'	=>	'ue.confirmed = 1'
										 );
	
		if ( checkJversion() == 2 ) {
			$joinsSQL[]				=	'JOIN #__user_usergroup_map g ON g.`user_id` = u.`id`';
		}
	
		if ( ! $isModerator ) {
			$tablesWhereSQL['banned']	=	'ue.banned = 0';
		}
		if ( $usergids ) {
			if ( checkJversion() == 2 ) {
				$tablesWhereSQL['gid']	=	'g.group_id IN (' . $usergids . ')';
			} else {
				$tablesWhereSQL['gid']	=	'u.gid IN (' . $usergids . ')';
			}
		}
	
		foreach ( $tableReferences as $table => $name ) {
			$tablesSQL[]				=	$table . ' ' . $name;
			if ( $name != 'u' ) {
				$tablesWhereSQL[]		=	"u.`id` = " . $name . ".`id`";
			}
		}
	
		// handles search criterias:
	
		$list_compare_types		=	$params->get( 'list_compare_types', 0 );
		$searchVals				=	new stdClass();
		$searchesFromFields		=	$tabs->applySearchableContents( $searchableFields, $searchVals, $searchFormValuesRAW, $list_compare_types );
		$whereFields			=	$searchesFromFields->reduceSqlFormula( $tableReferences, $joinsSQL, TRUE );
		if ( $whereFields ) {
			$tablesWhereSQL[]	=	'(' . $whereFields . ')';
	/*
			if ( $search === null ) {
				$search			=	'';
			}
	*/
		}
	
		$_PLUGINS->trigger( 'onBeforeUsersListBuildQuery', array( &$tablesSQL, &$joinsSQL, &$tablesWhereSQL ) );
	
		$queryFrom				=	"FROM " . implode( ', ', $tablesSQL )
								.	( count( $joinsSQL ) ? "\n " . implode( "\n ", $joinsSQL ) : '' )
								.	"\n WHERE " . implode( "\n AND ", $tablesWhereSQL );
	
		// handles old formatted names search:
	/*
		if ( $search != '' ) {
			$searchSQL			=	cbEscapeSQLsearch( strtolower( $_CB_database->getEscaped( $search ) ) );
			$queryFrom 			.=	" AND (";
	
			$searchFields		=	array();
			if ( $ueConfig['name_format']!='3' ) {
				$searchFields[]	=	"u.name LIKE '%%s%'";
			}
			if ( $ueConfig['name_format']!='1' ) {
				$searchFields[]	=	"u.username LIKE '%%s%'";
			}
			if ( is_array( $plugSearchFieldsArray ) ) {
				foreach ( $plugSearchFieldsArray as $v ) {
					if ( is_array( $v ) ) {
						$searchFields	=	array_merge( $searchFields, $v );
					}
				}
			}
			$queryFrom			.=	str_replace( '%s', $searchSQL, implode( " OR ", $searchFields ) );
			$queryFrom			.=	")";
		}
	*/
		$queryFrom				.=	" " . $filterby;
	
		$_PLUGINS->trigger( 'onBeforeUsersListQuery', array( &$queryFrom, 1, $listid ) );	// $uid = 1
	
		$errorMsg		=	null;
	
		// counts number of users and loads the listed fields of the users if not in search-form-only mode:
	
		if ( $searchmode == 0 ) {
			if ( checkJversion() == 2 ) {
				$_CB_database->setQuery( "SELECT COUNT(DISTINCT u.id) " . $queryFrom );
			} else {
			$_CB_database->setQuery( "SELECT COUNT(*) " . $queryFrom );
			}
			$total					=	$_CB_database->loadResult();
	
			if ( ( $limit > $total ) || ( $limitstart >= $total ) ) {
				$limitstart			=	0;
			}
	
			// $query					=	"SELECT u.id, ue.banned, '' AS 'NA' " . ( $fieldsSQL ? ", " . $fieldsSQL . " " : '' ) . $queryFrom . " " . $orderby
			if ( checkJversion() == 2 ) {
				$query				=	"SELECT DISTINCT ue.*, u.*, '' AS 'NA' " . ( $fieldsSQL ? ", " . $fieldsSQL . " " : '' ) . $queryFrom . " " . $orderby;
			} else {
				$query				=	"SELECT ue.*, u.*, '' AS 'NA' " . ( $fieldsSQL ? ", " . $fieldsSQL . " " : '' ) . $queryFrom . " " . $orderby;
			}
			$_CB_database->setQuery( $query, (int) $limitstart, (int) $limit );
			$users				=	$_CB_database->loadObjectList( null, 'moscomprofilerUser', array( &$_CB_database ) );
	
			if ( ! $_CB_database->getErrorNum() ) {
				// creates the CBUsers in cache corresponding to the $users:
				foreach ( array_keys( $users ) as $k) {
					CBuser::setUserGetCBUserInstance( $users[$k] );
				}
			} else {
				$users			=	array();
				$errorMsg		=	_UE_ERROR_IN_QUERY_TURN_SITE_DEBUG_ON_TO_VIEW;
			}
	
			if ( count( get_object_vars( $searchVals ) ) > 0 ) {
				$search			=	'';
			} else {
				$search			=	null;
			}
	
		} else {
			$total				=	null;
			$users				=	array();
			if ( $search === null ) {
				$search			=	'';
			}
		}
	
		// Compute itemId of users in users-list:
	
		if ( $Itemid ) {
			$option_itemid		=	(int) $Itemid;
		} else {
			$option_itemid		=	getCBprofileItemid( 0 );
		}
		HTML_comprofiler::usersList( $row, $users, $columns, $allFields, $lists, $listid, $search, $searchmode, $option_itemid, $limitstart, $limit, $total, $myUser, $searchableFields, $searchVals, $tabs, $list_compare_types, $showPaging, $hotlink_protection, $errorMsg, $random );
	}
コード例 #10
0
ファイル: file.php プロジェクト: GrottoCenter/GrottoCenter
                }
                ?>
                </td>
              </tr>
            </table>
<?php 
                if ($edition) {
                    ?>
            </form>
<?php 
                }
                ?>
            </div>
<?php 
            }
            if (allowAccess(comment_edit_all) && !$is_change) {
                //$edition) {
                ?>
<!--#################### NEW COMMENT ########################################-->
            <a name="new_<?php 
                echo $local_cat;
                ?>
_anchor"></a>
            <div id="new_<?php 
                echo $local_cat;
                ?>
" style="display:none;background-color:white;">
            <form id="new_<?php 
                echo $local_cat;
                ?>
_form" name="new_<?php 
コード例 #11
0
/**
 * This file is part of GrottoCenter.
 *
 * GrottoCenter is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * GrottoCenter is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with GrottoCenter.  If not, see <http://www.gnu.org/licenses/>.
 *
 * @copyright Copyright (c) 2009-2012 Cl�ment Ronzon
 * @license http://www.gnu.org/licenses/agpl.txt
 */
function getProperties($category, $id, $isConnected, $labelsBlank, $labelsSinceDate, $addTitle, $systemArray = array(), $for_printer = false, $opener)
{
    switch ($category) {
        case "entry":
            $AvgAe = getAvgAestheticism($id);
            $sqlAe = "SELECT round(Aestheticism) AS Aestheticism FROM `" . $_SESSION['Application_host'] . "`.`T_comment` WHERE Id_entry=" . $id;
            $AvgCa = getAvgCaving($id);
            $sqlCa = "SELECT round(Caving) AS Caving FROM `" . $_SESSION['Application_host'] . "`.`T_comment` WHERE Id_entry=" . $id;
            $AvgAp = getAvgApproach($id);
            $sqlAp = "SELECT round(Approach) AS Approach FROM `" . $_SESSION['Application_host'] . "`.`T_comment` WHERE Id_entry=" . $id;
            if (!$addTitle) {
                $histoAe = "<div onclick=\"JavaScript:infoHistoAe();\" class=\"histo\"><img src=\"" . getHistoSrc($sqlAe, 'Aestheticism') . "\" alt=\"image\" /></div>\n";
                $histoCa = "<div onclick=\"JavaScript:infoHistoCa();\" class=\"histo\"><img src=\"" . getHistoSrc($sqlCa, 'Caving') . "\" alt=\"image\" /></div>\n";
                $histoAp = "<div onclick=\"JavaScript:infoHistoAp();\" class=\"histo\"><img src=\"" . getHistoSrc($sqlAp, 'Approach') . "\" alt=\"image\" /></div>\n";
            } else {
                $histoAe = "";
                $histoCa = "";
                $histoAp = "";
            }
            $sql = "SELECT cat.*, ty." . $_SESSION['language'] . "_type AS typeName, ca.Name as NetwName, ca.Id as NetwId, ma.Name AS MasName, ma.Id AS MasId, ";
            //$sql .= "IF(ISNULL(ca.Id)=1,eybis.Min_depth,ca.Min_depth) AS Min_depth, ";
            //$sql .= "IF(ISNULL(ca.Id)=1,eybis.Max_depth,ca.Max_depth) AS Max_depth, ";
            $sql .= "IF(ISNULL(ca.Id)=1,eybis.Depth,ca.Depth) AS Depth, ";
            $sql .= "IF(ISNULL(ca.Id)=1,eybis.Is_diving,ca.Is_diving) AS Is_diving, ";
            $sql .= "IF(ISNULL(ca.Id)=1,eybis.Length,ca.Length) AS Length, ";
            $sql .= "IF(ISNULL(ca.Id)=1,eybis.Temperature,ca.Temperature) AS Temperature, ";
            $sql .= "IF(ISNULL(ca.Id)=1,NULL,(SELECT COUNT(*) FROM `" . $_SESSION['Application_host'] . "`.`J_cave_entry` WHERE ca.Id = Id_cave)) AS NumberOfEntries, ";
            $sql .= "GROUP_CONCAT(DISTINCT u.Url ORDER BY u.Url SEPARATOR '<br />\n') AS Partners ";
            $sql .= "FROM `" . $_SESSION['Application_host'] . "`.`T_entry` cat ";
            $sql .= "INNER JOIN `" . $_SESSION['Application_host'] . "`.`T_single_entry` eybis ON cat.Id = eybis.Id ";
            $sql .= "LEFT OUTER JOIN `" . $_SESSION['Application_host'] . "`.`T_type` ty ON cat.Id_type = ty.Id ";
            $sql .= "LEFT OUTER JOIN `" . $_SESSION['Application_host'] . "`.`J_cave_entry` ce ON cat.Id = ce.Id_entry ";
            $sql .= "LEFT OUTER JOIN `" . $_SESSION['Application_host'] . "`.`T_cave` ca ON ce.Id_cave = ca.Id ";
            $sql .= "LEFT OUTER JOIN `" . $_SESSION['Application_host'] . "`.`J_massif_cave` mc ON (mc.Id_cave = ca.Id OR mc.Id_entry = cat.Id) ";
            $sql .= "LEFT OUTER JOIN `" . $_SESSION['Application_host'] . "`.`T_massif` ma ON ma.Id = mc.Id_massif ";
            $sql .= "LEFT OUTER JOIN `" . $_SESSION['Application_host'] . "`.`J_entry_url` eu ON eu.Id_entry = cat.Id ";
            $sql .= "LEFT OUTER JOIN `" . $_SESSION['Application_host'] . "`.`T_url` u ON u.Id = eu.Id_url ";
            break;
        case "cave":
            $listSQL = "SELECT DISTINCT e.Id, e.Name ";
            $listSQL .= "FROM `" . $_SESSION['Application_host'] . "`.`T_entry` e ";
            $listSQL .= "INNER JOIN `" . $_SESSION['Application_host'] . "`.`J_cave_entry` ce ON ce.Id_entry = e.Id ";
            $listSQL .= "WHERE ce.Id_cave = " . $id . " AND e.Is_public = 'YES' ";
            if (!$isConnected) {
                $listSQL .= "AND e.Is_public = 'YES' ";
            }
            $listSQL .= "ORDER BY e.Name ";
            $entryList = getDataFromSQL($listSQL, __FILE__, "function", __FUNCTION__);
            $entriesList = "";
            for ($index = 0; $index < $entryList["Count"]; $index++) {
                $entriesList .= "<a href=\"JavaScript:openMe(" . $entryList[$index]['Id'] . ", 'entry', false);\">" . $entryList[$index]['Name'] . "</a>, ";
            }
            $entriesList = substr($entriesList, 0, strlen($entriesList) - 2);
            $sql = "SELECT cat.*, ma.Name AS MasName, ma.Id AS MasId ";
            $sql .= "FROM `" . $_SESSION['Application_host'] . "`.`T_cave` cat ";
            $sql .= "LEFT OUTER JOIN `" . $_SESSION['Application_host'] . "`.`J_massif_cave` mc ON mc.Id_cave = cat.Id ";
            $sql .= "LEFT OUTER JOIN `" . $_SESSION['Application_host'] . "`.`T_massif` ma ON ma.Id = mc.Id_massif ";
            break;
        case "massif":
            $listSQL = "SELECT COUNT(*) AS Nb, ";
            $listSQL .= "-MAX(ABS(IF(ISNULL(ca.Id)=1,eybis.Depth,ca.Depth))) AS Max_Depth, ";
            $listSQL .= "MAX(ABS(IF(ISNULL(ca.Id)=1,eybis.Length,ca.Length))) AS Max_Length, ";
            $listSQL .= "SUM(ABS(IF(ISNULL(ca.Id)=1,eybis.Length,ca.Length))) AS Sum_Length, ";
            $listSQL .= "-AVG(ABS(IF(ISNULL(ca.Id)=1,eybis.Depth,ca.Depth))) AS Avg_Depth, ";
            $listSQL .= "STD(ABS(IF(ISNULL(ca.Id)=1,eybis.Depth,ca.Depth))) AS Std_Depth, ";
            $listSQL .= "AVG(ABS(IF(ISNULL(ca.Id)=1,eybis.Length,ca.Length))) AS Avg_Length, ";
            $listSQL .= "STD(ABS(IF(ISNULL(ca.Id)=1,eybis.Length,ca.Length))) AS Std_Length ";
            $listSQL .= "FROM `" . $_SESSION['Application_host'] . "`.`T_entry` e ";
            $listSQL .= "INNER JOIN `" . $_SESSION['Application_host'] . "`.`T_single_entry` eybis ON e.Id = eybis.Id ";
            $listSQL .= "LEFT OUTER JOIN `" . $_SESSION['Application_host'] . "`.`J_cave_entry` ce ON e.Id = ce.Id_entry ";
            $listSQL .= "LEFT OUTER JOIN `" . $_SESSION['Application_host'] . "`.`T_cave` ca ON ca.Id = ce.Id_cave ";
            $listSQL .= "LEFT OUTER JOIN `" . $_SESSION['Application_host'] . "`.`J_massif_cave` mc ON (mc.Id_cave = ce.Id_cave OR mc.Id_entry = e.Id) ";
            $listSQL .= "WHERE mc.Id_massif = " . $id . " ";
            $entriesStats = getDataFromSQL($listSQL, __FILE__, "function", __FUNCTION__);
        default:
            $sql = "SELECT cat.* ";
            $sql .= "FROM `" . $_SESSION['Application_host'] . "`.`T_" . $category . "` cat ";
            break;
    }
    $sql .= "WHERE cat.Id = " . $id . " ";
    if (!$isConnected && $category == "entry") {
        $sql .= "AND cat.Is_public = 'YES' ";
    }
    if ($category == "entry") {
        $sql .= "GROUP BY cat.Id ";
        $sql .= "ORDER BY MasName DESC ";
    }
    $data = getDataFromSQL($sql, __FILE__, $opener, __FUNCTION__);
    if ($data['Count'] > 0) {
        $is_public = $data[0]['Contact_is_public'];
        $is_shown = $category == "caver" && ($is_public == Contact_for_registered && $isConnected || $is_public == Contact_for_everybody) || $category != "caver";
        if ($addTitle) {
            if (isset($data[0]['Nickname'])) {
                $title_name = $data[0]['Nickname'];
            } else {
                $title_name = $data[0]['Name'];
            }
            $innerHTML .= getTopMenu(getCloseBtn("JavaScript:resetDetails();", "<convert>#label=371<convert>") . "<div class=\"frame_title\">" . setTitle("#", "details", "<convert>#label=440<convert> " . $title_name, 1) . "</div>");
            //A propos de
        }
        if ($is_shown) {
            $innerHTML .= getInnerLine($data[0]['Name'], $data[0]['Name'], "<convert>#label=199<convert> :");
            //Nom
        }
        $innerHTML .= getInnerLine($entriesList, $entriesList, "<convert>#label=384<convert> :");
        //Entrées :
        $innerHTML .= getInnerLine($entriesStats[0]['Nb'], $entriesStats[0]['Nb'], "<convert>#label=384<convert> :");
        //Entrées :
        $innerHTML .= getInnerLine($entriesStats[0]['Max_Depth'], round($entriesStats[0]['Max_Depth']), "<convert>#label=758<convert> :", "", "<convert>#label=268<convert>");
        //Prof. Max. ://m
        $innerHTML .= getInnerLine($entriesStats[0]['Avg_Depth'], round($entriesStats[0]['Avg_Depth']), "<convert>#label=759<convert> :", "", "<convert>#label=268<convert>");
        //Prof. Moy. ://m
        $innerHTML .= getInnerLine($entriesStats[0]['Std_Depth'], round($entriesStats[0]['Std_Depth']), "<convert>#label=760<convert> :", "", "<convert>#label=268<convert>");
        //E.Type Prof. ://m
        $innerHTML .= getInnerLine($entriesStats[0]['Max_Length'], round($entriesStats[0]['Max_Length']), "<convert>#label=761<convert> :", "", "<convert>#label=268<convert>");
        //Dev. Max. ://m
        $innerHTML .= getInnerLine($entriesStats[0]['Sum_Length'], round($entriesStats[0]['Sum_Length']), "<convert>#label=762<convert> :", "", "<convert>#label=268<convert>");
        //Dev. Total ://m
        $innerHTML .= getInnerLine($entriesStats[0]['Avg_Length'], round($entriesStats[0]['Avg_Length']), "<convert>#label=763<convert> :", "", "<convert>#label=268<convert>");
        //Dev. Moy. ://m
        $innerHTML .= getInnerLine($entriesStats[0]['Std_Length'], round($entriesStats[0]['Std_Length']), "<convert>#label=764<convert> :", "", "<convert>#label=268<convert>");
        //E.Type Dev. ://m
        if ($isConnected) {
            $innerHTML .= getInnerLine($data[0]['Locked'], convertYN($data[0]['Locked'], "<convert>#label=441<convert>", "<convert>#label=442<convert>"), "<convert>#label=443<convert> :");
            //Oui //Non //Est en cours de modification
            $innerHTML .= getInnerLine($data[0]['Is_public'], convertYN($data[0]['Is_public'], "<convert>#label=441<convert>", "<convert>#label=442<convert>"), "<convert>#label=444<convert> :");
            //Est publique
        }
        $innerHTML .= getInnerLine($data[0]['typeName'], $data[0]['typeName'], "<convert>#label=114<convert> :");
        //Type de sous-sol
        if ($is_shown) {
            $innerHTML .= getInnerLine($data[0]['Surname'], $data[0]['Surname'], "<convert>#label=200<convert> :");
            //Prénom
        }
        $innerHTML .= getInnerLine($data[0]['Nickname'], $data[0]['Nickname'], "<convert>#label=34<convert> :");
        //Alias
        if ($is_shown) {
            $innerHTML .= getInnerLine($data[0]['Date_birth'], timeToStr($data[0]['Date_birth']), "<convert>#label=445<convert> ", "", "<convert>#label=446<convert>", getSinceDateFromD(cDate($data[0]['Date_birth'], false), $labelsBlank), "", "<convert>#label=447<convert>");
            //Né(e) le //(mm/jj/aaaa) //ans
        }
        $innerHTML .= getInnerLine($data[0]['Year_discovery'], $data[0]['Year_discovery'], "<convert>#label=109<convert> :", "", "", getSinceDateFromD("01/01/" . $data[0]['Year_discovery'], $labelsSinceDate));
        //Année de découverte
        $innerHTML .= getInnerLine($data[0]['Year_birth'], $data[0]['Year_birth'], "<convert>#label=147<convert> :", "", "", getSinceDateFromD("01/01/" . $data[0]['Year_birth'], $labelsSinceDate));
        //Année de fondation
        if ($is_shown) {
            //$innerHTML .= getInnerLine($data[0]['Date_inscription'],"<br />".timeToStr($data[0]['Date_inscription']),"<convert>#label=448<convert> ".$_SESSION['Application_name']." :","","<convert>#label=446<convert><br />",getSinceDateFromD(cDate($data[0]['Date_inscription'],false),$labelsSinceDate));//Date d'inscription à //(mm/jj/aaaa)
            $innerHTML .= getInnerLine($data[0]['Connection_counter'], $data[0]['Connection_counter'], "<convert>#label=449<convert> ", "", "<convert>#label=450<convert> " . $_SESSION['Application_name']);
            //S'est connecté //fois sur
            //$innerHTML .= getInnerLine($data[0]['Date_last_connection'],"<br />".timeToStr($data[0]['Date_last_connection']),"<convert>#label=24<convert> :","","<convert>#label=446<convert><br />",getSinceDateFromDT(cDate($data[0]['Date_last_connection'],false),$labelsSinceDate));//Dernière connection //(mm/jj/aaaa)
        }
        if ($isConnected) {
            //$innerHTML .= getInnerLine($data[0]['Date_reviewed'],"<br />".timeToStr($data[0]['Date_reviewed']),"<convert>#label=451<convert> :","","<convert>#label=446<convert><br />",getSinceDateFromDT(cDate($data[0]['Date_reviewed'],false),$labelsSinceDate));//Dernière modification //(mm/jj/aaaa)
        }
        if ($is_shown) {
            $innerHTML .= getInnerLine($data[0]['Year_initiation'], $data[0]['Year_initiation'], "<convert>#label=204<convert> :");
            //Année d'initiation à la spéléo
            if ($category == "entry") {
                $innerHTML .= getInnerLine($data[0]['Contact'], $data[0]['Contact'], "<convert>#label=741<convert> :");
                //Contact
            } else {
                $innerHTML .= getInnerLine($data[0]['Contact'], $data[0]['Contact'], "<convert>#label=146<convert> :", "mailto:" . $data[0]['Contact']);
                //Contact
            }
            if (isset($data[0]['City'])) {
                $innerHTML .= "<div class=\"detail_line\"><span class=\"details_label\"><convert>#label=102<convert> :</span><br />\n";
                //Adresse
                if ($category != "entry") {
                    $innerHTML .= getInnerLine($data[0]['Address'], $data[0]['Address']) . "<br />\n";
                }
                $innerHTML .= getInnerLine($data[0]['City'], $data[0]['Postal_code'] . " " . $data[0]['City']) . "<br />\n";
                $innerHTML .= getInnerLine($data[0]['Region'], $data[0]['Region'] . ", " . strtoupper(getCountry($_SESSION['language'], $data[0]['Country']))) . "<br />\n";
                $innerHTML .= "</div>";
            } else {
                $innerHTML .= getInnerLine($data[0]['Country'], getCountry($_SESSION['language'], $data[0]['Country']), "<convert>#label=98<convert> :");
                //Pays
            }
            $innerHTML .= getInnerLine($data[0]['Language'], $data[0]['Language'], "<convert>#label=205<convert> :");
            //Langue
        }
        if ($is_shown) {
            if ($data[0]['Latitude'] != "" && $data[0]['Longitude'] != "") {
                $innerHTML .= "<div class=\"detail_line\"><span class=\"details_label\"><convert>#label=660<convert></span>";
                $innerHTML .= " <span class=\"details_data\"><convert>#label=286<convert></span></div>";
                //Système géodésique //(GPS) - WGS84 Décimal
                $innerHTML .= getInnerLine($data[0]['Latitude'], round($data[0]['Latitude'], 5), "<convert>#label=103<convert> :", "", "<convert>#label=104<convert> <convert>#label=293<convert>.");
                //Latitude //degrés N.
                $innerHTML .= getInnerLine($data[0]['Longitude'], round($data[0]['Longitude'], 5), "<convert>#label=105<convert> :", "", "<convert>#label=104<convert> <convert>#label=294<convert>.");
                //Longitude //degrés S.
                $innerHTML .= "<div class=\"detail_line\"><input type=\"button\" name=\"convert\" class=\"button1\" value=\"<convert>#label=31<convert>...\" onclick=\"JavaScript:";
                $innerHTML .= "openWindow('converter_" . $_SESSION['language'] . ".php?c=coords&amp;lat=" . $data[0]['Latitude'] . "&amp;lng=" . $data[0]['Longitude'] . "&amp;i=" . $data[0]['Country'] . "&amp;readonly=true', '', 434, 260);\" /></div>";
                //<!--Convertisseur...-->
            }
        }
        $innerHTML .= getInnerLine($data[0]['Altitude'], $data[0]['Altitude'], "<convert>#label=106<convert> :", "", "<convert>#label=66<convert>");
        //Altitude //mètres
        $innerHTML .= getInnerLine($data[0]['NetwId'], $data[0]['NetwName'], "<convert>#label=453<convert>", "JavaScript:detailMarker(undefined, 'cave', " . $data[0]['NetwId'] . ", '" . $_SESSION['language'] . "')", "", $data[0]['NumberOfEntries'], "<convert>#label=454<convert>", "<convert>#label=455<convert>");
        //Fait partie du réseau //ayant //entrées
        $innerHTML .= getInnerLine($data[0]['MasId'], $data[0]['MasName'], "<convert>#label=560<convert> ", "JavaScript:detailMarker(undefined, 'massif', " . $data[0]['MasId'] . ", '" . $_SESSION['language'] . "')");
        //Fait partie du massif
        //$innerHTML .= getInnerLine($data[0]['Min_depth'],$data[0]['Min_depth'],"<convert>#label=456<convert> :","","<convert>#label=66<convert>");//Profondeur Min. //mètres
        //$innerHTML .= getInnerLine($data[0]['Max_depth'],$data[0]['Max_depth'],"<convert>#label=457<convert> :","","<convert>#label=66<convert>");//Profondeur Max. //mètres
        $innerHTML .= getInnerLine($data[0]['Depth'], $data[0]['Depth'], "<convert>#label=64<convert> :", "", "<convert>#label=66<convert>");
        //Profondeur Min. //mètres
        $innerHTML .= getInnerLine($data[0]['Length'], $data[0]['Length'], "<convert>#label=68<convert> :", "", "<convert>#label=66<convert>");
        //Développement //mètres
        $innerHTML .= getInnerLine($data[0]['Temperature'], $data[0]['Temperature'], "<convert>#label=69<convert> :", "", "<convert>#label=70<convert>");
        //Température //degrés celsius
        $innerHTML .= getInnerLine($data[0]['Is_diving'], convertYN($data[0]['Is_diving'], "<convert>#label=441<convert>", "<convert>#label=442<convert>"), "<convert>#label=71<convert> :");
        //Oui //Non //Spéléo. plongée
        if ($category == "entry") {
            $innerHTML .= getInnerLine($data[0]['Partners'], replaceLinks($data[0]['Partners']), "<convert>#label=670<convert> :<br />\n");
            //Sites partenaires
        }
        $innerHTML .= getInnerLine($AvgAe, round($AvgAe, 1), "<convert>#label=458<convert> :", "", "<convert>#label=459<convert>");
        //Intérêt ///10
        if (isset($AvgAe)) {
            $innerHTML .= $histoAe;
        }
        $innerHTML .= getInnerLine($AvgCa, round($AvgCa, 1), "<convert>#label=460<convert> :", "", "<convert>#label=459<convert>");
        //Progression ///10
        if (isset($AvgCa)) {
            $innerHTML .= $histoCa;
        }
        $innerHTML .= getInnerLine($AvgAp, round($AvgAp, 1), "<convert>#label=461<convert> :", "", "<convert>#label=459<convert>");
        //Accès ///10
        if (isset($AvgAp)) {
            $innerHTML .= $histoAp;
        }
        if ($category == "entry" && $addTitle) {
            $innerHTML .= "<a href=\"#\" onclick=\"JavaScript:detailMarker(event, 'entry', '" . $id . "', '" . $_SESSION['language'] . "',true, {'geodesic': '" . $systemArray["geodesic"] . "','length': '" . $systemArray["length"] . "','temperature': '" . $systemArray["temperature"] . "'});\" title=\"<convert>#label=184<convert>\" style=\"color:red;\"><!--Voir la fiche détaillée de cette entrée-->\n";
            $innerHTML .= "<convert>#label=185<convert>\n";
            //Fiche détaillée...
            $innerHTML .= "</a><br />\n";
        }
        if ($isConnected && allowAccess(properties_view_all)) {
            $innerHTML .= "### Reserved for webmasters: ###<br />\n";
            foreach ($data[0] as $key => $value) {
                if ($key != "Custom_message") {
                    $innerHTML .= "<b>" . $key . "</b> : <i>" . replaceLinks(nl2br($value)) . "</i><br />\n";
                }
            }
        }
    }
    if ($addTitle) {
        $innerHTML .= getBotMenu();
    }
    $innerHTML = "<div class=\"menu\">" . $innerHTML . "</div>";
    return $innerHTML;
}
コード例 #12
0
ファイル: request.php プロジェクト: GrottoCenter/GrottoCenter
        ?>
    <div>
      <form id="<?php 
        echo $list_form;
        ?>
" name="<?php 
        echo $list_form;
        ?>
" method="post" action="">
<?php 
        if (allowAccess(request_delete_mine) && $read_write) {
            ?>
        <input type="hidden" id="d_author_id" name="d_author_id" value="" />
<?php 
        }
        if (allowAccess(request_approve_all) && in_array($status_name, $approve_status_array)) {
            ?>
        <input type="hidden" id="v_author_id" name="v_author_id" value="" />
        <input type="hidden" id="n_author_validated" name="n_author_validated" value="" />
        <input type="hidden" id="delete_type" name="upload_type" value="delete_attachment" />
        <input type="hidden" id="attachment_file" name="attachment_file" value="" />
        <input type="hidden" id="file_id" name="file_id" value="" />
        <input type="hidden" id="delete_source_manager" name="source_manager" value="../../html/request_<?php 
            echo $_SESSION['language'];
            ?>
.php?type=<?php 
            echo $type;
            ?>
&amp;deleted=true&amp;id=<?php 
            echo $id;
            ?>
コード例 #13
0
include "../../conf/config.php";
include "../../func/function.php";
include "../declaration.php";
header("Content-type: text/plain");
$frame = "function";
$action = isset($_GET['action']) ? $_GET['action'] : '';
$guest = isset($_GET['guest']) ? $_GET['guest'] : '';
$guest = urldecode(stripslashes($guest));
$delay = isset($_GET['delay']) ? $_GET['delay'] : 5000;
$delay = ($delay + 0) / 1000;
//en ms => s
$id = isset($_GET['id']) ? $_GET['id'] : '';
$message = isset($_GET['message']) ? $_GET['message'] : '';
$message = strip_tags(urldecode(stripslashes($message)));
$actionWhiteList = array("list", "refresh", "send");
if (!in_array($action, $actionWhiteList) || !allowAccess(chat_all)) {
    exit;
}
$answer = "";
define(ROOM_FILE_PATH, substr(__FILE__, 0, strlen(__FILE__) - 31) . "chat/room_" . $id . ".txt", true);
define(MAX_LINES, 500);
define(DELIMITER, "<d/>", true);
define(SLEEP_DELAY, 2 * $delay);
define(TIME_OUT_DELAY, 24 * $delay);
define(TIME_INDEX, 0);
define(GUEST_INDEX, 1);
define(MESSAGE_INDEX, 2);
define(PICTURE_INDEX, 3);
define(UNIX_TIME_STAMP, time());
function addStyle($n, $style)
{
コード例 #14
0
ファイル: url.php プロジェクト: GrottoCenter/GrottoCenter
</div>
			  </td></tr><tr><td class="field">
			    <input type="hidden" id="delete_id" name="delete_id" value="<?php 
        echo $did;
        ?>
" />
          <input type="submit" class="button1" id="delete" name="delete" value="<convert>#label=55<convert>" /><!--Supprimer-->
        </td></tr><tr><td class="field">
          <input class="button1" type="button" id="cancel" name="cancel" value="<convert>#label=77<convert>" onclick="JavaScript:newCancel();" /><!--Annuler-->
        </td></tr>
      </table>
    </form>
<?php 
        break;
    case "edit":
        if (!allowAccess(url_edit_all)) {
            exit;
        }
        if ($locked) {
        } else {
            if (!isset($_POST['save']) || $save_failed) {
                ?>
    newBeforeLoad(true);
    <?php 
                echo getCDataTag(false);
                ?>
    </script>
  </head>
  <body onbeforeunload="JavaScript:newOnBeforeUnload(event);"  onunload="JavaScript:newOnUnload(true);" onload="JavaScript:newOnLoad(true);">
    <?php 
                echo getTopFrame();
コード例 #15
0
ファイル: massif.php プロジェクト: GrottoCenter/GrottoCenter
</div>
			  </td></tr><tr><td class="field">
			    <input type="hidden" id="delete_id" name="delete_id" value="<?php 
        echo $did;
        ?>
" />
          <input type="submit" class="button1" id="delete" name="delete" value="<convert>#label=55<convert>" /><!--Supprimer-->
        </td></tr><tr><td class="field">
          <input class="button1" type="button" id="cancel" name="cancel" value="<convert>#label=77<convert>" onclick="JavaScript:newCancel();" /><!--Annuler-->
        </td></tr>
      </table>
    </form>
<?php 
        break;
    case "edit":
        if (!allowAccess(massif_edit_all)) {
            exit;
        }
        if ($locked) {
        } else {
            if (!isset($_POST['save']) || $save_failed) {
                ?>
    newBeforeLoad(true);
    <?php 
                echo getCDataTag(false);
                ?>
    </script>
  </head>
  <body onbeforeunload="JavaScript:newOnBeforeUnload(event);"  onunload="JavaScript:newOnUnload(true);" onload="JavaScript:newOnLoad(true);">
    <?php 
                echo getTopFrame();
コード例 #16
0
 $_SESSION['Application_version'] = $app_prop['Version'];
 $_SESSION['Application_timer'] = $app_prop['Timer_min'];
 $_SESSION['Application_availability'] = $app_prop['Availability'];
 $_SESSION['Application_message'] = $_SESSION['Application_title'] . "<convert>#label=156<convert>" . $app_prop['Estimated_reopening_time'] . "<br /><a href=\"JavaScript:window.top.location='" . $_SESSION['Application_url'] . "/index.php?logout=true';\"><convert>#label=334<convert> <!--Raffraichir la page--></a>";
 //<br /><br />Work in progress, please come back later...<br />Estimated time for reopening :
 //$_SESSION['Application_message'] = $_SESSION['Application_title']."<convert>#label=581<convert> :<br />"."<a href=\"http://www.grottocenter.org\" title=\"GrottoCenter\">www.grottocenter.org</a><br />"."<convert>#label=582<convert>.<br /><a href=\"JavaScript:window.top.location='".$_SESSION['Application_url']."/index.php?logout=true';\"><convert>#label=334<convert> <!--Raffraichir la page--></a>";
 $_SESSION['Application_revision'] = $app_prop['Revision'];
 $_SESSION['Application_creation'] = $app_prop['Creation'];
 $_SESSION['Application_authors'] = $app_prop['Authors'];
 $_SESSION['Application_copyright'] = $app_prop['Copyright'];
 $_SESSION['Application_authors_contact'] = $app_prop['Authors_contact'];
 $_SESSION['Application_thanks'] = $app_prop['Thanks'];
 $_SESSION['Application_noframe'] = "<convert>#label=157<convert>";
 //Frames are not supported !
 $_SESSION['Application_data_set'] = True;
 if (allowAccess(keep_connected)) {
     $_SESSION['Application_availability'] = 1;
 } else {
     if ($_SESSION['Application_availability'] != 1) {
         $labels = getLabelArray("general", $_SESSION['language']);
         $script = '<script type="text/javascript" charset="UTF-8">';
         $script .= getCDataTag(true);
         $script .= 'alert("<convert>#label=158<convert> ' . $_SESSION['Application_timer'] . ' <convert>#label=159<convert> ' . $_SESSION['Application_title'] . ' <convert>#label=160<convert>");';
         //Vous allez \352tre d\351connect\351 dans //minutes car //va entrer en mode de maintenance.\nVeuillez validez votre travail en cours.
         $script .= 'mySite.setLogOff(' . $_SESSION['Application_timer'] . ',"<convert>#label=161<convert> ' . $_SESSION['Application_title'] . ' <convert>#label=162<convert>");';
         //Vous allez \352tre d\351connect\351 car //est en cours de maintenance.\nVeuillez nous en excuser.
         $script .= getCDataTag(false);
         $script .= '</script>';
         echo $script;
     }
 }
コード例 #17
0
      </form>
<?php 
    }
    ?>
  	</div>
  	<div class="avatar">
      <img src="../upload/logos/<?php 
    echo $logo_filename;
    ?>
" alt="logo" />
    </div>
    <div class="content">
			<div class="label">
  				<span class="value">
<?php 
    if (allowAccess(grotto_edit_all)) {
        ?>
          <a href="grotto_<?php 
        echo $_SESSION['language'];
        ?>
.php?type=edit&id=<?php 
        echo $id;
        ?>
" target="filter" title="<convert>#label=53<convert>"><!--Modifier--><?php 
        echo $grotto[0]['Name'];
        ?>
</a>
<?php 
    } else {
        echo $grotto[0]['Name'];
    }
コード例 #18
0
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with GrottoCenter.  If not, see <http://www.gnu.org/licenses/>.
 *
 * @copyright Copyright (c) 2009-2012 Clément Ronzon
 * @license http://www.gnu.org/licenses/agpl.txt
 */
$diag_new_inst = isset($_GET['diag_status']);
if ($diag_new_inst) {
    include "../conf/config.php";
    include "../func/function.php";
    include "declaration.php";
    $frame = "filter";
}
if (!allowAccess(request_view_mine)) {
    exit;
}
if ($diag_new_inst) {
    echo getDoctype(false) . "\n";
    ?>
<html <?php 
    echo getHTMLTagContent();
    ?>
>
  <head>
    <script type="text/javascript" charset="UTF-8" src="<?php 
    echo getScriptJS(__FILE__);
    ?>
"></script>
<?php