示例#1
0
  *	and receive a Method Not Allowed error and status code.
  *	
  */
 if ($_SERVER["REQUEST_METHOD"] !== "POST") {
     http_response_code(405);
     trigger_json_response(405, "Method Not Allowed");
     die;
 }
 /*	
  *	If either updating the source code from the repository
  *	fails or reloading the web server's configuration
  *	fails, then respond with an Internal Server Error and
  *	status code.
  *	
  */
 if (update_source() || reload_server()) {
     http_response_code(500);
     trigger_json_response(500, "Internal Server Error");
     die;
 }
 /*	
  *	Otherwise, respond with the HTTP status code 202
  *	(Accepted), and a message confirming that the source
  *	and server reload were successful.
  *	
  *	Note: In some circumstances, it may be helpful to
  *	verify that the webhook was successful. In this case,
  *	one can check the API's response on GitHub via:
  *	
  *		AutomataFiddle      >
  *		Settings            >
示例#2
0
             if ($update == true) {
                 $sql .= ', ';
             }
             $sql .= " fam_marr_church_source='SOURCE'";
             $update = true;
         }
         if ($read_famDb->fam_div_source) {
             update_source($read_famDb, $read_famDb->fam_div_source, 'family', 'fam_div_source', $read_famDb->fam_gedcomnumber);
             if ($update == true) {
                 $sql .= ', ';
             }
             $sql .= " fam_div_source='SOURCE'";
             $update = true;
         }
         if ($read_famDb->fam_text_source) {
             update_source($read_famDb, $read_famDb->fam_text_source, 'family', 'fam_text_source', $read_famDb->fam_gedcomnumber);
             if ($update == true) {
                 $sql .= ', ';
             }
             $sql .= " fam_text_source='SOURCE'";
             $update = true;
         }
         $sql .= " WHERE fam_id='" . $read_famDb->fam_id . "'";
         if ($update == true) {
             $result = $dbh->query($sql);
         }
     }
     echo '<br>';
 }
 // *** Update "update_status" to number 2 ***
 $result = $dbh->query("UPDATE humo_settings SET setting_value='2'\r\n\t\t\tWHERE setting_variable='update_status'");