403Webshell
Server IP : 192.64.118.117  /  Your IP : 3.148.113.167
Web Server : LiteSpeed
System : Linux premium56.web-hosting.com 4.18.0-513.24.1.lve.1.el8.x86_64 #1 SMP Thu May 9 15:10:09 UTC 2024 x86_64
User : thecgapy ( 1160)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/thecgapy/www/wp-content/plugins/e-signature/models/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/thecgapy/www/wp-content/plugins/e-signature/models/Signer.php
<?php

/**
 *  @author abu shoaib
 *  @since 1.3.0
 */
class WP_E_Signer extends WP_E_Model {

    private $table;

    public function __construct() {
        parent::__construct();

        $this->table = $this->table_prefix . "document_users";
    }

    public function get_document_signer_info($user_id, $document_id) {
        $signers = $this->wpdb->get_results(
                $this->wpdb->prepare(
                        "SELECT * FROM " . $this->table . " WHERE user_id=%d and document_id=%d LIMIT 1", $user_id, $document_id
                )
        );

        if (!empty($signers[0]))
            return $signers[0];
        else
            return false;
    }

    public function insert($signers) {

        if ($this->exists($signers['user_id'], $signers['document_id'])) {
            $this->update($signers);
            return;
        }


        $this->wpdb->query(
                $this->wpdb->prepare(
                        "INSERT INTO " . $this->table . " VALUES(null, %d, %d, %s,%s,%s)", $signers['user_id'], $signers['document_id'], wp_unslash($signers['signer_name']), $signers['signer_email'], wp_unslash($signers['company_name'])
                )
        );

        return $this->wpdb->insert_id;
    }

    public function exists($user_id, $document_id) {

        return $this->wpdb->query(
                        $this->wpdb->prepare(
                                "SELECT id FROM " . $this->table . " WHERE user_id=%d and document_id=%d", $user_id, $document_id
                        )
        );
    }

    public function update($signers) {

        $this->wpdb->query(
                $this->wpdb->prepare(
                        "UPDATE " . $this->table . " SET signer_name=%s,signer_email=%s,company_name=%s WHERE user_id=%d and document_id=%d", $signers['signer_name'], $signers['signer_email'], $signers['company_name'], $signers['user_id'], $signers['document_id']
                )
        );

        return $this->wpdb->insert_id;
    }

    public function updateField($user_id, $document_id, $field, $value) {
        return $this->wpdb->query(
                        $this->wpdb->prepare(
                                "UPDATE $this->table SET $field='%s' WHERE user_id=%d and document_id=%d", $value, $user_id, $document_id
                        )
        );
    }

    public function delete($document_id) {

        return $this->wpdb->query(
                        $this->wpdb->prepare(
                                "DELETE from " . $this->table . " WHERE document_id=%d", $document_id
                        )
        );
    }

    public function get_all_signers($document_id) {

        return $this->wpdb->get_results(
                        $this->wpdb->prepare(
                                "SELECT * FROM " . $this->table . " WHERE document_id = %d", $document_id
                        )
        );
    }
    
    
    public function display_signers(){
        
            $inviteObj = new WP_E_Invite();
            echo $inviteObj->reciepent_list(esigpost('document_id'),false,false);
    }
    
}

Youez - 2016 - github.com/yon3zu
LinuXploit