function addUser($a_info)
 {
     //var_dump($a_info);
     $a_info['rss_hash'] = md5($a_info['login'] . time());
     $a_info['date_registered'] = time();
     insertLine(T_USERS, array_keys($a_info), array_values($a_info));
 }
Exemplo n.º 2
0
function announceWrite($announcement, $by)
{
    $index = getrows('announcements') + 1;
    $string[0] = date('y-m-d H:i:s');
    $string[1] = $by;
    $string[2] = $announcement;
    insertLine($index, $string, 'announcements');
    return;
}
 function setUrls($a_urls, $idSite)
 {
     $r = query("DELETE FROM " . T_SITE_URL . "\n\t\t\t\t\tWHERE idsite = {$idSite}");
     foreach ($a_urls as $value) {
         if (strlen(trim($value[1])) != 0) {
             insertLine(T_SITE_URL, array('idsite', 'url'), $value);
         }
     }
 }
<?php

define('ROOT_PATH', realpath(dirname(__FILE__)) . '/');
require_once 'vendor/autoload.php';
require_once 'src/config.php';
require_once 'src/google.php';
require_once 'src/spreadsheet.php';
require_once 'src/insert.php';
//-----------------------------------------------------------------------------
$entries = readFromFile(ROOT_PATH . $iniSettings['bug_file']);
if (count($entries) == 0) {
    echo "No Entries";
    exit;
}
//-----------------------------------------------------------------------------
$accessToken = getAccessToken($client);
$spreadsheet = getSpreadsheet($accessToken, $iniSettings['sheet_title']);
$worksheetFeed = $spreadsheet->getWorksheets();
$worksheet = $worksheetFeed->getByTitle('Reported Typos');
//-----------------------------------------------------------------------------
$results = insertLine($worksheet, $entries);
echo json_encode($results);
Exemplo n.º 5
0
         $page_content .= deleteLine($filename, $value);
     }
     break;
 case 'o':
     if ($bLogged && $value != "") {
         $position = $value;
         if ($contentInsert) {
             $page_content .= insertLine($filename, $position, $contentInsert);
         }
     }
     break;
 case 'i':
     if ($bLogged && $value != "") {
         $contentInsert = $value;
         if ($position) {
             $page_content .= insertLine($filename, $position, $contentInsert);
         }
     }
     break;
 case 'z':
     if ($bLogged) {
         $page_content .= archiveInfo($backupDir);
         $bEnd = true;
         $note = "";
     }
     break;
 case 'x':
     if ($bLogged) {
         $page_content .= delete($filename);
         $bEnd = true;
     }