File: ck.php

package info (click to toggle)
python-ck 1.9.4-1.1
  • links: PTS
  • area: main
  • in suites: bookworm, bullseye
  • size: 1,004 kB
  • sloc: python: 6,505; php: 344; sh: 34; makefile: 3
file content (37 lines) | stat: -rw-r--r-- 724 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?php
 /*

  Collective Knowledge

  See CK LICENSE.txt for licensing details.
  See CK COPYRIGHT.txt for copyright details.

  Developer: Grigori Fursin

 */

 # Load local environment, if needed
 if (file_exists('local_env.php')) require_once 'local_env.php';

 # Start session
 session_start();

 # Type
 $xt='';

 # initalize path to CK
 $ckr=getenv("CK_ROOT"); 
 if ($ckr=="") $ckr=getcwd();

 # Call CK web in php
 $ckp=$ckr . '/ck/repo/module/web/php/ck_web.php';

 # Check if library exists
 if (!file_exists($ckp)) {
   header("content-type: application/json; charset=UTF-8"); 
   print '{"return":1, "error":"Internal CK web service error (Can\'t find ck_web.php)"}';
   exit(1);
 }
 else
   require_once $ckp;
?>