コード例 #1
0
ファイル: mongodb.php プロジェクト: gmargari/reportdb
function ensureIndexExistsInDB($collection, $field)
{
    // TODO: private
    try {
        $db = connectMongo();
    } catch (MongoException $e) {
        handleException($e);
        return false;
    }
    $db->{$collection}->ensureIndex(array($field => 1));
    return true;
}
コード例 #2
0
ファイル: manual_toc.php プロジェクト: smrealms/smrv2.0
								<img src="<?php 
    echo URL;
    ?>
/images/help/empty.jpg" width="32" height="32">
							</th>
							<th width="32">
								<img src="<?php 
    echo URL;
    ?>
/images/help/empty.jpg" width="32" height="32">
							</th>
							<th width="100%" align="center" valign="middle" style="font-size:18pt;font-weight:bold;">Table of Content</th>
							<th width="32"><a href="<?php 
    echo URL;
    ?>
/manual_toc.php"><img src="<?php 
    echo URL;
    ?>
/images/help/contents.jpg" width="32" height="32" border="0"></a></th>
						</tr>
					</table>
				</td>
			</tr>

		</table>

	</body>
</html><?php 
} catch (Exception $e) {
    handleException($e);
}
コード例 #3
0
ファイル: remote.php プロジェクト: rosarion/core
    $service = substr($pathInfo, 1, $pos - 1);
    $file = \OC::$server->getConfig()->getAppValue('core', 'remote_' . $service);
    if (is_null($file)) {
        throw new RemoteException('Path not found', OC_Response::STATUS_NOT_FOUND);
    }
    // force language as given in the http request
    \OC_L10N::setLanguageFromRequest();
    $file = ltrim($file, '/');
    $parts = explode('/', $file, 2);
    $app = $parts[0];
    // Load all required applications
    \OC::$REQUESTEDAPP = $app;
    OC_App::loadApps(array('authentication'));
    OC_App::loadApps(array('filesystem', 'logging'));
    switch ($app) {
        case 'core':
            $file = OC::$SERVERROOT . '/' . $file;
            break;
        default:
            if (!\OC::$server->getAppManager()->isInstalled($app)) {
                throw new RemoteException('App not installed: ' . $app);
            }
            OC_App::loadApp($app);
            $file = OC_App::getAppPath($app) . '/' . $parts[1];
            break;
    }
    $baseuri = OC::$WEBROOT . '/remote.php/' . $service . '/';
    require_once $file;
} catch (Exception $ex) {
    handleException($ex);
}