<commit_before><?php # script - upload_cert.php
session_start();

// If no session value presents, redirect to
if (!isset($_SESSION['nama_user'])) {
  require_once('includes/login_functions.php');
  $url = absolute_url();
  header("Location: $url");
  exit();
}

$page_title = 'Unggah Permohonan Sertifikat - Admin YOLO CA';
include('includes/admin_header.html');

include('connect/pg_connect.php');

$org_id = $_GET['org_id'];

if (isset($_POST['submitted'])) {
  if (isset($_FILES['cert'])) {
    if (move_uploaded_file($_FILES['cert']['tmp_name'], "certificates/{$_FILES['cert']['name']}")) {
      $path = 'certificate-authority-pki/certificates/' . basename($_FILES['cert']['name']);
      $q = "UPDATE sertifikat SET berkas = '$path' WHERE id_organisasi = $org_id";
      $result = pg_query($dbc, $q);
<commit_msg>cast organization id to integer<commit_after><?php # script - upload_cert.php
session_start();

// If no session value presents, redirect to
if (!isset($_SESSION['nama_user'])) {
  require_once('includes/login_functions.php');
  $url = absolute_url();
  header("Location: $url");
  exit();
}

$page_title = 'Unggah Permohonan Sertifikat - Admin YOLO CA';
include('includes/admin_header.html');

include('connect/pg_connect.php');

$org_id = (int) $_GET['org_id'];

if (isset($_POST['submitted'])) {
  if (isset($_FILES['cert'])) {
    if (move_uploaded_file($_FILES['cert']['tmp_name'], "certificates/{$_FILES['cert']['name']}")) {
      $path = 'certificate-authority-pki/certificates/' . basename($_FILES['cert']['name']);
      $q = "UPDATE sertifikat SET berkas = '$path' WHERE id_organisasi = $org_id";
      $result = pg_query($dbc, $q);

{'fraction_non_alphanumeric': 0.19951923076923078, 'fraction_numerical': 0.0, 'mean_word_length': 5.55511811023622, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6838300', 'n_tokens_mistral': 570, 'n_tokens_neox': 569, 'n_words': 109}