Пример #1
0
    global $mysqli;
    global $id;
    global $cid;
    $query = 'INSERT INTO ClassComment(CID, ID, Comment) VALUES (?,?,?)';
    #$date = date('Y-m-d H:i:s');
    $stmt = $mysqli->prepare($query);
    if (!$stmt) {
        echo "Prepare failed: (" . $mysqli->errno . ")" . $mysqli->error;
    }
    if (!$stmt->bind_param("iis", $cid, $id, $_GET['content'])) {
        echo "Binding parameters failed: (" . $stmt->errno . ") " . $stmt->error;
    }
    if (!$stmt->execute()) {
        echo "Execute failed: (" . $stmt->errno . ") " . $stmt->error;
    }
    $stmt->close();
}
if (!empty($_GET['content'])) {
    commentInsertion();
}
if ($cid != NULL) {
    findDes();
    findComment();
    submitComment();
    //>>>>>>> Update for COmment
}
$mysqli->close();
?>

</body>
</html>
 // column 2: file name  (location of tag) - currently not used because we are using tags files
 //           for native resources, and user will never be able to jump to the native resources
 // column 3: line number (+ VIM comment) -  currently not used because we are using tags files
 //           for native resources, and user will never be able to jump to the native resources
 // column 4-n: extension fields
 $columns = explode("\t", $line);
 $extensions = buildExtensions($columns);
 $identifier = $columns[0];
 $fileItemId = -1;
 $key = $identifier;
 $className = '';
 $type = '';
 $namespaceName = '\\';
 // the default namespace
 $signature = '';
 $comment = findComment($phdPdo, $identifier, $extensions, $commentStatements);
 $returnType = '';
 $isProtected = 0;
 $isPrivate = 0;
 $isStatic = 0;
 $isDynamic = 0;
 $isNative = 1;
 $hasVariableArgs = hasVariableArgs($phdPdo, $identifier, $extensions, $commentStatements);
 $kind = strtolower($extensions['kind']);
 if ('c' == $kind) {
     $className = $identifier;
     $type = RESOURCE_CLASS;
 } else {
     if ('d' == $kind) {
         $type = RESOURCE_DEFINE;
     } else {